Below is the code i hv
Sex:<br/> <input type="radio" name="sex" value="Milk" checked> Male<br> <input type="radio" name="sex" value="Butter"> Femail<br> <br/> Gift:<br/> <select name="gift"> <option selected>T-Shirt</option> <option>Mug</option> <option>Bear</option> </select>
From the html, I can simply use 'checked' for radio button and 'selected' from dropdown menu to define certain element as the default value. I don't have problem with that for my registration form. However, i have a problem when it comes to 'update page'.
Basically, i've a database as usual. In the update page, I want to initially insert the previous data he/she inserted. So, first i'll fetch those data by using mysql_fetch_array(). then, for textboxes, i can use something like this:
Name: <input type="text" name="name" value="<?php echo"$row" ?>"><br/>
I can simply straight away place the data into the value's attribute to show it in the textbox. but how to do that for radio button and for dropdown menu?