| | |
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 |
Tag cloud for PHP
.htaccess access ajax apache api array beginner binary body broken cakephp checkbox class cms code cron curl database date date/time directory display download dynamic echo email error file files folder form forms function functions google href htaccess html image include insert integration ip java javascript joomla limit link list login loop mail menu mlm mod_rewrite msqli_multi_query multiple mycodeisbad mysql oop parse paypal pdf php problem query radio random recursion regex remote script search send seo server sessions sms soap source space sql static structure syntax system table tutorial update upload url validation validator variable video web webdesign wordpress xml youtube





