Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

Professional Opinions
Ask a Question
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

troubleshooting Question

How can I have multiple buttons in HTML that POST to PHP?

Avatar of davidcowler
davidcowlerFlag for United Kingdom of Great Britain and Northern Ireland asked on
8 Comments1 Solution313 ViewsLast Modified:
Hi Experts

I'm sure this question is as old as the hills but I haven't been able to find an exisitng suitable answer on EE.

I have a HTML page that has two buttons, each of which I want to go to different PHP scripts. I need the form method to POST some variables to the script, so I am using buttons instead of just graphics and/or text.

I understand that the buttons have to be of the 'submit' type but can only make them all do the same thing!

This particular issue has two buttons, as mentioned, but I can see that I might need to have another page in my project that has more than 2 buttons.

How can I achieve this in PHP, or maybe Javascript?

Avatar of Michel Plungjan
This problem has been solved!
Unlock 1 Answer and 8 Comments.
See Answers