dak888 Posted August 1, 2007 Share Posted August 1, 2007 Hello all, my first post and I'm very new to PHP. Looks like the right place to ask this question. The situation. I've created a MySql query that extracts some customer information and displays it on a page. Works great. I then want the end user to be able to edit some of the results and select a checkbox if they want the results to go to the next page. The problem. There may be several rows of data and I can't figure out how to a: Check if a particular check box has been checked. b: If the checkbox has been checked, move it to the next page. Here is some code so far: On the page that returns the results from MySql: <form action="print-fax.php" method="post"> <?php do { ?> <tr> <td align="center"><input name="print" type="checkbox" value="yes" checked="checked" /></td> <td align="left"> <input name="sku" type="text" value="<?php echo $row_searchOrderNumber['IFullSKU']; ?>" size="20" /></td> <td align="left"> <input name="Description" type="text" value="<?php echo $row_searchOrderNumber['IDescription']; ?>" size="50" /></td> <td align="center"> <input name="Qty" type="text" value="<?php echo $row_searchOrderNumber['IQuantity']; ?>" size="3" /></td> <td align="left"> <input name="Options" type="text" value="<?php echo $row_searchOrderNumber['GROUP_CONCAT(OOptionValue)']; ?>" size="15" /></td> </tr> <?php } while ($row_searchOrderNumber = mysql_fetch_assoc($searchOrderNumber)); ?> <tr> <td colspan="5" align="right"> <input name="Print" type="submit" value="Print" /> </td> </tr> </form> My pitiful code on the next page (it works sort of, at least it returns the last row from the results if the checkbox is checked): <?php if ($_POST['print'] == yes){ echo $_POST['sku']; echo $_POST['Description']; echo $_POST['Qty']; echo $_POST['Options'];} else { echo "Not Checked";} ?> I just don't know which direction to go. Thanks, DaK Quote Link to comment https://forums.phpfreaks.com/topic/62878-extract-from-repet-region/ 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.