How to insert radiobutton value into the mysql?
This is addrecordfrom.p hp
This is addrecordproces s.php
POST['submit_rec'])) {
$recordno =
POST['recordno'];
$types =
POST['types'];
$sql = "INSERT INTO records VALUES('$record no', '$types')";
$results = mysql_query($sq l);
if (!$results) {
echo "Unable to store data";
}
}
mysql_close();
?>
[/CODE]
My problem is...there is no radiobutton value in the database when i click the submit button..Can anyone help me?? :(
This is addrecordfrom.p hp
Code:
<form name="addsummonrecord" method="post" action="addrecordprocess.php" id="signup" onSubmit="return checkform(this);"> <table width="452" border="1" align="right" cellpadding="4" cellspacing="3" bordercolor="#003093" id="table"> <tr> <td width="210" class="labelfield">Record Code:</td> <td width="211" nowrap class="field"> <input name="recordno" type="text" size="10" maxlength="3" class="fieldcellinput"> </td> </tr> <tr> <td class="labelfield">Payment:</td> <td nowrap class="labelfield"> <input type="radio" name="types" value="01" c>Paid <input type="radio" name="types" value="02">None </td> </tr> </table> <input name="submit_rec" type="submit" class="button" id="submit_rec" value="Add New Record" ><input type="reset" name="reset" value="Reset" class="button"> </p> </form>
This is addrecordproces s.php
Code:
<?php include "connection.inc"; if(isset( [CODE]%4$s
$recordno =
Code:
%4$s
$types =
Code:
%4$s
$sql = "INSERT INTO records VALUES('$record no', '$types')";
$results = mysql_query($sq l);
if (!$results) {
echo "Unable to store data";
}
}
mysql_close();
?>
[/CODE]
My problem is...there is no radiobutton value in the database when i click the submit button..Can anyone help me?? :(
Comment