Why would a php script enter null data on refresh?
I have a php form ive made but every time i open the page the script sends empty data to the database – works fine with actually posting the real data to the database how can i stop the data entry on returning to the page
September 6, 2010 | Filed Under Scripts FAQs
Comments
One Response to “Why would a php script enter null data on refresh?”
Powered by Yahoo! Answers
what are you using to trigger the script to enter the data in the database? You would be using…
if ($_POST){
do something;
}
this way it will only send the data when someone submits the form. you can also is $_GET or $_REQUEST depending on your forms action.