请,有人可以告诉我我的查询出了什么问题吗?当我在注册页面上上传文件时,它说的是错误的查询?

问题描述 投票:0回答:1

这是我填写表单并提交时的代码,显示“ Wrong query”错误:

    $link=mysqli_connect("localhost","root","12345","jobscope")or die("Cannot connect");

    $nm=$_POST['nm'];
    $gender=$_POST['gender'];
    $email=$_POST['email'];
    $addr=$_POST['addr'];
    $ph=$_POST['ph'];
    $mobile=$_POST['mobile'];
    $cl=$_POST['cl'];
    $cas=$_POST['cas'];
    $cindustry=$_POST['cindustry'];
    $quali=$_POST['quali'];
    $profile=$_POST['profile'];
    $pwd=$_POST['pwd'];
    move_uploaded_file($_FILES['resume']['tmp_name'],"uploads/".$_FILES['resume']['name']);
    $path = "uploads/".$_FILES['resume']['name'];


    $q="insert into employees(ee_resume,ee_pwd,ee_fnm,ee_gender,ee_email,ee_add,ee_phno,ee_mobileno,ee_current_location,ee_annualsalary,ee_current_industry,ee_qualification,ee_profile) values('$path','$pwd','$nm','$gender','$email','$addr','$ph','$mobile','$cl','$cas','$cindustry','$quali','$profile')";           
    mysqli_query($link,$q) or die("Wrong qquery");
    mysqli_close($link);
    header("location:employeeregister.php");
php mysql sql mongodb wamp
1个回答
-1
投票

检查您的vars内容中是否包含单个逗号。尝试每个var

$ myvar = str_replace(“'”,“”,$ myvar);

© www.soinside.com 2019 - 2024. All rights reserved.