Help with browser refresh

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
mijreed
Forum Newbie
Posts: 4
Joined: Thu Nov 13, 2008 10:16 am

Help with browser refresh

Post by mijreed »

My website has a form you can enter a blog into. How do you stop someone from just hitting the refresh on the browser and putting up the same post over and over?

I was using a session variable to compare the string previously posted to the one currently being sent through the browser but this seemed very inefficient.
mijreed
Forum Newbie
Posts: 4
Joined: Thu Nov 13, 2008 10:16 am

Re: Help with browser refresh

Post by mijreed »

Just figured it out. So simple.

I just sent a header() function with the URL to same page after the mysql_query function. This cleared out the HTTP variables so a refresh didn't do anything.
Post Reply