How to store and retrieve a <SELECT> option to database in PHP ?

Jackal

New member
Hi
i have a form with more than one selection

i want to store what the user select on each category and then store it to a database in order to retrieve it back

for example i have the following selection options:
<form action="one.php" method="get">
<select name="q1">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
</select><br>

<select name="q2">
<option value="car">car</option>
<option value="cat">cat</option>
<option value="bus">bus</option>
</select>
<input type="submit">
</form>


I know how to connect to database
but i want the code that will store the selection
and how i can retrieve it back to a form

thanks
 
Back
Top