Hello I have a problem with a Html form sending 0 instead of 1 to my database, it is set as tinyint 1
I have been messing with this for days.
I use phpmyadmin xampp server html php
$con = mysql_connect("localhost","root","");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
if (!isset($_POST['action']))
mysql_select_db("client", $con);
$sql="INSERT INTO skills (driving_licence,HGV,engineer,carpenter,chef,PSV)
VALUES
('$_POST[driving_licence]','$_POST[HGV]','$_POST[engineer]','$_POST[carpenter]','$_POST[chef]','$_POST[PSV]')";
if (!mysql_query($sql,$con))
{
die('Error: ' . mysql_error());
}
echo "skills have been added";
mysql_close($con);
?>
The form code is
Record Client Skills
Please choose the relevent boxes
I hold a valid a HGV licence
I have an Engineering qualification
I have a Carpentry qualification
I have Catering qualification
I have a valid PSV licence
Can anyone help?
Rob