Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Submit form to itself 1

Status
Not open for further replies.

Azzuri

Programmer
Apr 16, 2002
18
CA
Hello,

I am submitting a form to itself and would like to know if there is a method for the form to know its been submitted more then once. In ASP you can you can write

request.form.count > 1

Is there anything similar in PHP. I have been looking but cannot seem to find anything. Any help is appreciated.

Thanks,
 
you could you sessions and have a variable such as $count. Then everytime the form is submitted add 1 to the count making $count the number of times the form has been submitted.

HTH

User: My computers smoking.
Support: Turn it off.
User: Will i lose my work??
Support: Turn it off.
 
If you want to use PHP, I agree sessions is probably the best way to go.

If you want to do something client side, I've seen some pages disable the submit button with Javascript before submitting the form.

That would be a Javascript forum question though.

D
 
I've dun it this way. First time the form is called the url should contain first=yes. In the script of the form when you link to it change first to no and test it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top