| | |
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 |
5.2.10 action apache api array beginner beneath binary broken cakephp checkbox class classes cms code cron curl database date destroy display dynamic echo echo$_get[x]changingitintovariable... email encode error fcc file files folder form forms function functions google header howtowriteathesis href htaccess html image images include insert ip javascript joomla limit link local login mail memberships menu mlm mod_rewrite multiple multipletables mysql mysqlquery neutrality oop open passwords paypal pdf php provider query radio random record remote rss script search server sessions sockets source space sql strip_tags syntax system table template thesishelp tutorial update upload url validator variable video voteup web window.onbeforeunload=closeme; youtube





