html checkbox怎么在php,HTML checkbox form php

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 have a Full UK Driving Licence

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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值