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

form with multiple submit buttons

Status
Not open for further replies.

simonmay

Programmer
Jul 12, 2000
1
CA
How do i know which submit button has been clicked on the server script if i post a form that has 3 different submit buttons that post to the same page ?
 
The easiest way to do this is by putting different values in each button. E.g. Add Customer, Delete Customer, Edit Cusotmer.<br><br>You can then check the value of the button selected and then proceed with whatever functions etc you need to do.<br><br>e.g.<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;If Submit = &quot;Add Cutomer Then<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Do some stuff<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ElseIF Submit = &quot;Delete Customer&quot; Then<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Do something else<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;End IF<br><br>Hope this helps<br>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top