Jump to content

Mulitple Button with different Values


teparky

Recommended Posts

Hi Guys,

 

Here a bit of a stupid question, I have a set of Submit Buttons that need to have different values. This is because I do a If(isset($_POST['VALUE'])).

 

So what I have is buttons that represent a User, when the user clicks the button next to the user name it posts the value back to the page and then loads a new function. Does anyone know if this is possible.

 

Am I able to use the <input name="user[$value]" type="submit" value="View Profile" />.

 

Regards

Thomas pARK

Link to comment
https://forums.phpfreaks.com/topic/256656-mulitple-button-with-different-values/
Share on other sites

You shouldn't rely on the value of submit buttons for form processing and some browsers do not send the submit buttons name and value along with the form submission.

 

There is an alternative, like sending a hidden field with an its name as "action" and the value as the action for each different form.

 

Regards, PaulRyan.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.