Goose87 Posted July 27, 2007 Share Posted July 27, 2007 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. Quote Link to comment Share on other sites More sharing options...
btherl Posted July 27, 2007 Share Posted July 27, 2007 Please post your code (including the code that generates the submit button) Quote Link to comment Share on other sites More sharing options...
cooldude832 Posted July 27, 2007 Share Posted July 27, 2007 the way i handle multiple submit buttons (like a preview and submit sorta deal) is make 2 buttons that are input type submit with contrasting values and then i say if($_POST['submit'] == case1){//case 1} for example it lets you do as many as you want Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.