| | |
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
Views: 2075 | Replies: 3
| Thread Tools | Search this Thread |
Tag cloud for PHP
.htaccess access ajax apache api array beginner binary broken cakephp checkbox class cms code cron curl database date datepart directory display download dynamic echo email error file files folder form forms function functions google head href htaccess html image include insert integration ip java javascript joomla jquery limit link login loop mail menu methods mlm mod_rewrite multiple mysql number oop parse password paypal pdf php phpmyadmin problem query radio random recursion regex remote script search select server sessions sms soap source space speed sql structure syntax system table tutorial update updates upload url validation validator variable video web xml youtube





