<input name="like" type="checkbox" value="yes" checked/>
_______________ _______________ _______________ _____________
if(isset($_POST['like'])){
$likeuser = "yes";
mysql_query("IN SERT INTO comments (LJ)
VALUES ('$likeuser')") or die ("could not add like yes " . mysql_error());
} else {
$likeuser = "no";
mysql_query("IN SERT INTO comments (LJ)
VALUES ('$likeuser')") or die ("could not add like no " . mysql_error());
}
-----------------------------------------------
mysql LJ varchar(10)
ERROR:
could not add like yes Unknown column 'LJ' in 'field list'
i want to add value "yes" if check is selected by user and "no" for user not checked.
Thanks in advance.
_______________ _______________ _______________ _____________
if(isset($_POST['like'])){
$likeuser = "yes";
mysql_query("IN SERT INTO comments (LJ)
VALUES ('$likeuser')") or die ("could not add like yes " . mysql_error());
} else {
$likeuser = "no";
mysql_query("IN SERT INTO comments (LJ)
VALUES ('$likeuser')") or die ("could not add like no " . mysql_error());
}
-----------------------------------------------
mysql LJ varchar(10)
ERROR:
could not add like yes Unknown column 'LJ' in 'field list'
i want to add value "yes" if check is selected by user and "no" for user not checked.
Thanks in advance.
Comment