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
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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.