deemurphy Posted March 8, 2009 Share Posted March 8, 2009 I am trying to get information from an array, so the user can use a checkbox and that information can be passed on to the owner of the company. I am using the following code: <td class=TableHeader><H5>Coffee Products</H5></td> <?php //$sql = "select * from tblcategory,tblsubcategory where tblcategory.category_id=tblsubcategory.category_id order by categoryName"; $sql = "SELECT * FROM `tblsubcategory` WHERE `category_id` = 4"; $result = mysql_query($sql); $num_rows=mysql_num_rows($result); echo "<div align=right class=FormTitle>Total No. of Sub Categories : " . $num_rows."</div>"; $sno = 0; $noofrecord = mysql_num_rows($result); if ($start == "" && $end == "") { $start = 1; $end = 20; } while($row=mysql_fetch_array($result)) { if ($sno == $end) { break; } $sno++; $subCategoryid= $row["subCategory_id"]; $categoryname= $row["categoryName"]; $subCategoryName= $row["subCategoryName"]; if ($sno >= $start && $sno <= $end) { echo "<tr><td class=TableFields>$subCategoryName</td>"; echo "<td class=TableFields>$categoryname</td>"; } } ?> <tr><td colspan=5 align="right"> </td></tr> </table> <table width="85%" cellspacing="5" cellpadding> <tr> <td width="100%"> <input type=hidden name=categoryName value='Office Coffee'> <input type=hidden name=category_id value=4> <strong>PLEASE SELECT A PRODUCT:</strong><br> <input name="subCategoryName1" type="radio" value="subCategoryName"><?php echo "$subCategoryName";?><br> <input name="subCategoryName2" type="radio" value="subCategoryName"><?php echo "$subCategoryName";?><br> <td width="100%"> <p align="center"> </p> <p align="center"><font face="Arial" size="2"> <table border=0> <tr><Td valign=top> <form method=post action=build_breakroom.php<? echo "?page=" . $page; ?>> <input type=hidden name=category_id value=4> <input type=hidden name=categoryName value='Office Coffee'> <p> <input type="submit" value="Continue / Exit" name="B1" class="button3"> </td> </tr> </table> Beside the two radio buttons I am getting decafe coffee and there is more then that, like regular, tea, etc. How would I get the correction information from this query and post it back to the user, then send to the next application being called which is build_breakroom.php and that is where the email get sent. Thank you LadyDee ??? 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.