I sometimes will do what Hong said above, and just ask “Are you sure?” before the PC does something exceptionally foolhardy and/or brave. Of course, sometimes I will toss it out there even if it is something bold and/or brave. I do not want them thinking that when I ask that question, it always means you should change your actions. And, if a PC does something exceptionally brave, but a bit foolish, I tend to go a little easy on them (i.e., throwing their body in front of spears to save a child...)
If a PC has a high intelligence or wisdom and tries to do something stupid, I might add in, “Your guy is pretty smart (or wise), so I just want to make sure you really want to do… (fill in the blank with something really stupid)?” Sometimes, if they hear the DM say what they are going to do, then they realize that “well, gee, my second level PC rushing out of his hiding place to charge the giant is not such a good idea.”
And, sometimes I will remind characters about something they might have forgotten from a session 10 weeks ago, but was only a week ago in game.