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">

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.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.