插入表格时检测到错误

<?PHP

    include("db.php");

    $sql="INSERT INTO registration (`user_name`,'user_email','user_contact_no','user_address','user_dateofbirth','user_gender','user_photo')

    VALUES ('"$_POST['fullname']."','"$_POST['userid']"','"$_POST['cno']"','"$_POST['add']"','"$_POST['dateofbirth']"','"$_POST['gender']"','"echo'<img src= "upload/".$img>'"')";

?>


如何解决这个问题


开满天机
浏览 183回答 3
3回答

HUH函数

检查一下-<?PHP&nbsp; &nbsp; include("db.php");&nbsp; &nbsp; $sql="INSERT INTO registration (`user_name`,'user_email','user_contact_no','user_address','user_dateofbirth','user_gender','user_photo')&nbsp; &nbsp; VALUES ('".$_POST['fullname']."','".$_POST['userid']."','".$_POST['cno']."','".$_POST['add']."','".$_POST['dateofbirth']."','".$_POST['gender']."','<img src= /upload/'".$img.">')";?>

素胚勾勒不出你

试试这个 -<?PHP&nbsp; &nbsp; include("db.php");&nbsp; &nbsp; $fullname = $_POST['fullname'];&nbsp; &nbsp; $userid = $_POST['userid'];&nbsp; &nbsp; $cno = $_POST['cno'];&nbsp; &nbsp; $add = $_POST['add'];&nbsp; &nbsp; $dateofbirth = $_POST['dateofbirth'];&nbsp; &nbsp; $gender = $_POST['gender'];&nbsp; &nbsp; $sql="INSERT INTO registration (`user_name`,'user_email','user_contact_no','user_address','user_dateofbirth','user_gender','user_photo')&nbsp; &nbsp; VALUES ('".$fullname"','".$userid."','".$cno."','".$add."','".$dateofbirth."','".$gender."','<img src= /upload/'".$img.">')";?>
打开App,查看更多内容
随时随地看视频慕课网APP