| | |
POST data submit in page refresh
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
•
•
Hi,
If I refresh a page than post values are also submitting repeatedly...........
how to solve this problem....
You could check whether or not the submit button was actioned:
if (isset($_POST['Submit'])) { Name your submit button 'Submit'
Thats one way of doing it.
•
•
Join Date: Sep 2008
Posts: 10
Reputation:
Solved Threads: 0
One thing you can do is..
its obvious that on pressing submit u have performed a task
for e.g updating a databse or something...
Just put a condition if the task has been executed successfully., i.e redirect to the same page or any other page on success.
if(opertion success)
{
// redirect to the same/some page.
}
now if u hit refresh the whole page wil b loaded again.
its obvious that on pressing submit u have performed a task
for e.g updating a databse or something...
Just put a condition if the task has been executed successfully., i.e redirect to the same page or any other page on success.
if(opertion success)
{
// redirect to the same/some page.
}
now if u hit refresh the whole page wil b loaded again.
![]() |
Similar Threads
- Firefox Compatibility help with script (JavaScript / DHTML / AJAX)
- php mail (PHP)
- Image Resizer (PHP)
- One form, posting to two scripts? (PHP)
- MYSQL/PHP variable check (MySQL)
- Variable Validation & MYSQL (PHP)
Other Threads in the PHP Forum
- Previous Thread: general php help
- Next Thread: cURL problems
| Thread Tools | Search this Thread |
apache api array basic beginner binary broken cache cakephp checkbox class cms code computing confirm cron curl customizableitems database date delete display dynamic echo email error external file files filter folder form forms forum function functions gc_maxlifetime google headmethod host howtowriteathesis href htaccess html iframe image include insert ip javascript joomla limit link login mail malfunction memmory memory menu mlm multiple mysql navigation oop parsing paypal pdf php phpmysql problem query question radio random recursion remote script search select server sessions sms snippet source space sql syntax system table thesishelp trouble tutorial update upload url validator variable video web youtube





