Hello i have a page called Buy.html the main focus on the page is the form. My website allows people to buy textbooks from one another. I have a database that keeps track of all the textbooks.
Here is the main code for the page:
I want it so when the user gets to the two radio buttons and choses between them some php code will execute. For example i want it so when the user selects the ByGrade_Radio radio button checkboxes will start to be listed for each textbook found in the database with the matching grade.Code:<div align="center"> <table border="0" width="650" bgcolor="#FFFFFF"> <tr> <td> </td> <td> <!--Page below--> <p align="center"><font size=5><b>Buy</b></font></p> <br /> <br /> <div> <form> <b>Province</b>: <input type="text"></input> <br /> <b>City</b>: <input type="text"></input> <br /> <b>School</b>: <input type="text"></input> <b>Campus</b>: <input type="text"></input> <br /> <b>Grade</b>: <input type="text"></input> <br /><br /> <input type="radio" Name= "ByGrade_Radio" /> Pick all text books for Grade. <br /> <input type="radio" Name= "ByCourse_Radio" /> Pick all text books by Course. </form> </div> <!--Page Ends--> <p> </td> <td> </td> </tr> </table> </div>
As well since the php will be creating these checkboxes i need to be able to retrieve whether a checkbox is checked or not using $_POST, so i may process the input since it is a form.
The major thing i am not sure about is how i will retrieve which checkbox is checked since the checkboxes are being generated from the mySQL database.
Is this possible? If not, does anyone have other suggestions/alternates...




Reply With Quote