0

Hi, I hav created html pages containing radio buttons and checkboxes. But how do I send the values of radio buttons and checkboxes and drop down button values to my database using POST.

here are my radio buttons and drop down button:

<tr>																	<td>Marital Status</td>														<td>:</td>
<td>Single</td>
<td><input type="radio" name="mar" value="" checked></td>
<td>Married</td>
<td><input type="radio" name="mar" value=""></td>
<td width="12%">Divorcee</td>
<td width="30%"><input type="radio" name="mar" value=""></td>
</tr>
<td width="18%">Date of birth</td>
<td width="4%">:</td>
<td width="14%"><select name="date" size="1">
2
Contributors
1
Reply
3
Views
9 Years
Discussion Span
Last Post by ProfessorPC
0

i have done this with radio buttons im sure the same will work with the drop downs
in the form add your radio button

<input type="radio" value="Vista" name="os"><label>Vista</label>

then when you have your form send the info to the php script you can call it like this

$os = $_POST['os'];
$add = mysql_query("INSERT into Operating_Systems (os) Values (`$os`)") or die(mysql_error());

this will get the value of the selected radio button and insert into the db.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.