Please support our PHP advertiser: Lunarpages PHP Web Hosting
![]() |
•
•
Join Date: Dec 2007
Posts: 24
Reputation:
Rep Power: 2
Solved Threads: 1
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:
here are my radio buttons and drop down button:
html Syntax (Toggle Plain Text)
<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>
html Syntax (Toggle Plain Text)
<td width="18%">Date of birth</td> <td width="4%">:</td> <td width="14%"><select name="date" size="1">
Last edited by peter_budo : May 17th, 2008 at 6:52 am. Reason: Keep It Organized - please use [code] tags
•
•
Join Date: Dec 2007
Location: Oklahoma
Posts: 169
Reputation:
Rep Power: 2
Solved Threads: 17
i have done this with radio buttons im sure the same will work with the drop downs
in the form add your radio button
then when you have your form send the info to the php script you can call it like this
this will get the value of the selected radio button and insert into the db.
in the form add your radio button
<input type="radio" value="Vista" name="os"><label>Vista</label>
$os = $_POST['os'];
$add = mysql_query("INSERT into Operating_Systems (os) Values (`$os`)") or die(mysql_error()); Last edited by ProfessorPC : May 17th, 2008 at 12:13 am.
![]() |
Similar Threads
Other Threads in the PHP Forum
- Dynamic Query (JSP)
Other Threads in the PHP Forum
- Previous Thread: Stupid error!!!
- Next Thread: Updating required 2 Clicks of the same button
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)





Linear Mode