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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Careless "Submit"

Status
Not open for further replies.

phpPete

Programmer
Feb 25, 2002
88
US
I read here the other day about not naming Submit buttons submit. At the time it didn't occur to me why, but I ran into the problem this morning. I carelessly left all the submit buttons named as Submit on a page calling $PHP_SELF with multiple forms. Took about an hour of figuring out why the logic wasn't working, then the lightbulb goes off in my head: "Yo, you're submit buttons are all named the same dummy ..", followed by the big "DOH!!!"

Sometimes the obvious eludes me..;)

TaTaForNow
pete
 
That's not a problem, if you use different values for each of them.

In the second script you can test the value of the submit button and then you know witch one was pressed. Anikin
Hugo Alexandre Dias
Web-Programmer
anikin_jedi@hotmail.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top