Navajo Posted February 26, 2009 Share Posted February 26, 2009 Ok, I'm a newbie at PHP and I need some help off an expert please, I can't think of how I would do this. I have a table with 7 columns, the first column contains the ProductID code and the 7th column contains a checkbox, all generated through a while loop on the results of the database. How can I get this so that when I tick for example two checkboxes, the productcodes that they relate to are passed to a new php script called editLimit.php. I'm really stuck guys and girls Can someone please help me!? thanks for any help in advance. <center><table border=1> <tr align=left valign=top> <td><h3><center> Product ID </center></h3></td> <td><h3><center>Product Description</center></h3></td> <td><h3><center> Assesment Limit </center></h3></td> <td><h3><center> Update Avaliable </center></h3></td> <td><h3><center>Delete</center></h3></td> <td><h3><center>Edit</center></h3></td> <td><h3><center>Select</center></h3></td> </tr> <?php while ($row = mysql_fetch_array($result)) { extract($row); $productID = $row['vchar_product_id']; $description = $row['vchar_description']; $assLimit = $row['vchar_assessment_limit']; $updateAv = $row['i_update_available']; echo "<tr>\n<td align=center>$productID</td>\n"; echo "\n<td align=center>$description</td>\n"; echo "\n<td align=center>$assLimit</td>\n"; echo "\n<td align=center>$updateAv</td>\n"; echo "<td align=center><form name=\"passDelete\" method=\"post\" action=\"passDelete.php?id=$productID\"><input type=\"hidden\" name=\"prodID\" value=\"$productID\"><input type=\"image\" src=\"images/delete.jpg\" alt=\"submit button\" name=\"submit\" onclick=\"return confirm('Are you sure you want to delete the product called $productID?')\" value=\"Delete Product\"></form></td>\n"; echo "<td align=center><form name=\"passDelete\" method=\"post\" action=\"editDatabase.php?id=$productID\"><input type=\"hidden\" name=\"prodID\" value=\"$productID\"><input type=\"image\" src=\"images/edit.jpg\" alt=\"submit button\" name=\"submit\" value=\"Edit Product\"></form></tr>\n"; echo "<td align=center><form name=\"editLim\" method=\"post\" action=\"editLimit.php?id=$productID\"><input type=\"checkbox\" name=\"prodID\" value=\"$productID\"></form></td>\n"; } echo "</table></center>"; ?> here's what it looks like at present: Quote Link to comment Share on other sites More sharing options...
Navajo Posted February 26, 2009 Author Share Posted February 26, 2009 done it ! I was being dull. 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.