hi all, hope all be fine and happy
i need to insert the resulting data of the radio button to my data base
my code is:
<form id="form1" name="form1" method="post" action="register_PMP_Action.php" onsubmit="return validate()">
<span style="font-size:11.0pt;font-family:"normal Verdana"">Please
provide us your contact details:</span></b></span></u></p>
<p class="MsoNormal" style="margin-left: 10; margin-top: 0; margin-bottom: 0" dir="ltr" align="left"> </p>
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="76%" id="AutoNumber1" dir="ltr">
<tr>
<td width="16%" dir="ltr" align="left">
<p style="margin-top: 0; margin-bottom: 0; margin-left:10" dir="ltr"><span style="font-size: 11pt">
Name *</span></td>
<td width="84%">
<p dir="ltr" style="margin-top: 0; margin-bottom: 0; margin-left:10" align="left">
<span style="font-size: 11pt"><input MAXLENGTH="255" SIZE="30" NAME="cust_name"></span></td>
</tr>
<tr>
<td width="16%" dir="ltr" align="left">
<p style="margin-top: 0; margin-bottom: 0; margin-left:10" dir="ltr"><span style="font-size: 11pt">
E-mail address *</span></td>
<td width="84%">
<p dir="ltr" style="margin-top: 0; margin-bottom: 0; margin-left:10" align="left">
<span style="font-size: 11pt">
<input TYPE="TEXT" MAXLENGTH="255" SIZE="30" NAME="cust_email"></span></td>
</tr>
<tr>
<td width="16%" dir="ltr" align="left">
<p style="margin-top: 0; margin-bottom: 0; margin-left:10" dir="ltr"><span style="font-size: 11pt">
Phone </span></td>
<td width="84%">
<p dir="ltr" style="margin-top: 0; margin-bottom: 0; margin-left:10" align="left">
<span style="font-size: 11pt">
<input TYPE="TEXT" MAXLENGTH="255" SIZE="30" NAME="cust_phone"></span></td>
</tr>
</table>
<p class="MsoNormal" dir="ltr" style="margin-top: 0; margin-bottom: 0; margin-left:10" align="left"> </p>
<p class="MsoNormal" style="margin-left: 10; margin-top: 0; margin-bottom: 0" dir="ltr" align="left">
<u><b><span style="font-size: 11.0pt; font-family: normal Verdana">2. </span>
</b><span dir="LTR"><b>
<span style="font-size:11.0pt;font-family:"normal Verdana"">How you reached us?</span></b></span></u></p>
<p class="MsoNormal" dir="ltr" style="margin-top: 0; margin-bottom: 0; margin-left:10" align="left">
<span style="font-size: 11pt">
<input TYPE="radio" NAME="How_you_reached_us" VALUE="face_book">facebook</span></p>
<p class="MsoNormal" dir="ltr" style="margin-top: 0; margin-bottom: 0; margin-left:10" align="left">
<span style="font-size: 11pt">
<input TYPE="radio" NAME="How_you_reached_us" VALUE="Internet_search">Internet search</span></p>
<p class="MsoNormal" dir="ltr" style="margin-top: 0; margin-bottom: 0; margin-left:10" align="left">
<span style="font-size: 11pt">
<input TYPE="radio" NAME="How_you_reached_us" VALUE="Email_shot">E-mail shot</span></p>
<p class="MsoNormal" dir="ltr" style="margin-top: 0; margin-bottom: 0; margin-left:10" align="left">
<span style="font-size: 11pt">
<input TYPE="radio" NAME="How_you_reached_us" VALUE="net_forums">Forums</span></p>
<p class="MsoNormal" dir="ltr" style="margin-top: 0; margin-bottom: 0; margin-left:10" align="left">
<span style="font-size: 11pt">
<input TYPE="radio" NAME="How_you_reached_us" VALUE="net_friends">Friends</span></p>
<p class="MsoNormal" dir="ltr" style="margin-top: 0; margin-bottom: 0; margin-left:10" align="left">
<span style="font-size: 11pt">
<input TYPE="radio" NAME="How_you_reached_us" VALUE="google_ads">Ads</span></p>
<p class="MsoNormal" dir="ltr" style="margin-top: 0; margin-bottom: 0; margin-left:10" align="left">
<span style="font-size: 11pt">
<input TYPE="radio" NAME="How_you_reached_us" ID="other_How_you_reached_us" value="Others">Other
(please, mention)
<input MAXLENGTH="255" SIZE="30" onFocus="Javascript:document.myForm.other_How_you_reached_us.checked=true" NAME="How_you_reached_us"></span></p>
<p class="MsoNormal" dir="ltr" style="margin-top: 0; margin-bottom: 0; margin-left:10" align="left">
<b><span style="font-size: 11pt; color: #FF8000"> </span></b></p>
<!-- submit button, function verify need to be called when we press submit button -->
<div class="buttonSubmit"><input type="submit" value="Submit" onclick="return verify(this);"/>
</div>
</form>
and the action code is:
<?php
$cust_name=$_POST['cust_name'];
$cust_email=$_POST['cust_email'];
$cust_phone=$_POST['cust_phone'];
$face_book=$_POST['face_book'];
$Internet_search=$_POST['Internet_search'];
$Email_shot=$_POST['Email_shot'];
$net_forums=$_POST['net_forums'];
$net_friends=$_POST['net_friends'];
$google_ads=$_POST['google_ads'];
$Others=$_POST['Others'];
?>
<?php
$string = "INSERT INTO user (name,email,phone,facebook,Internetsearch,Emailshot,netforums,netfriends,googleads,others) VALUES ('".$cust_name."','".$cust_email."','".$cust_phone."','".$face_book."','".$Internet_search."','".$Email_shot."','".$net_forums."','".$net_friends."','".$google_ads."','".$Others."')";
the problem is it inserts the name, email and phone in my database and didn't insert the results of choosing from the radio button items.