Jump to content

multiple submit buttons on one page


Goose87

Recommended Posts

Ok, to put this all into context i have a table created through echo's which display data from the database.  The database has multiple items in the thing, so i have lots of rows.  Each row has a submit button on it with a different hidden ID, which is $row[0], which is the ID of the items that are being displayed.

 

Displaying all the data and having the submit buttons isnt the problem.  The problem is clicking the button.  I'm not sure how to manage the data at the end.  At the moment I have:

 

if(isset($_POST['buy'])) {

$w = $_POST['equipment'];

 

and then i want this to do an "insert into" on a different table with the id of "equipment" and the id of the user (which is stored in the session).

 

The database syntax works coz i tested it, but what to type after the:

if(isset($_POST['buy'])) {

 

just loses me.

 

Any help would be greatly appreciated!

thanks.

Goose.

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.