POST data submit in page refresh

Reply

Join Date: Aug 2007
Posts: 64
Reputation: nil_gh_80 is an unknown quantity at this point 
Solved Threads: 0
nil_gh_80's Avatar
nil_gh_80 nil_gh_80 is offline Offline
Junior Poster in Training

POST data submit in page refresh

 
0
  #1
Nov 15th, 2008
Hi,

If I refresh a page than post values are also submitting repeatedly...........

how to solve this problem....
Reply With Quote Quick reply to this message  
Join Date: Jul 2004
Posts: 234
Reputation: PoA is an unknown quantity at this point 
Solved Threads: 8
PoA PoA is offline Offline
Posting Whiz in Training

Re: POST data submit in page refresh

 
0
  #2
Nov 15th, 2008
Post your code. We cant tell the problems unless you post your codes.
Reply With Quote Quick reply to this message  
Join Date: Mar 2007
Posts: 55
Reputation: darren2005 is an unknown quantity at this point 
Solved Threads: 2
darren2005's Avatar
darren2005 darren2005 is offline Offline
Junior Poster in Training

Re: POST data submit in page refresh

 
0
  #3
Nov 17th, 2008
Originally Posted by nil_gh_80 View Post
Hi,

If I refresh a page than post values are also submitting repeatedly...........

how to solve this problem....
What you’re doing is essentially submitting the data again.

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.
Reply With Quote Quick reply to this message  
Join Date: Sep 2008
Posts: 10
Reputation: bhavik_thegame is an unknown quantity at this point 
Solved Threads: 0
bhavik_thegame bhavik_thegame is offline Offline
Newbie Poster

Re: POST data submit in page refresh

 
0
  #4
Nov 17th, 2008
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.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the PHP Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC