Как удалить все эти ошибки из моего кода
я хочу загрузить изображение в свою форму, но я не могу помочь себе, Пожалуйста, скажите мне, если вы можете.
ОШИБКА ЗАКЛЮЧАЕТСЯ В СЛЕДУЮЩЕМ:
Notice: Undefined index: image in C:\xampp\htdocs\signup\data.php on line 5 Notice: Undefined index: image in C:\xampp\htdocs\signup\data.php on line 6 Notice: Undefined index: image in C:\xampp\htdocs\signup\data.php on line 7 Notice: Only variables should be passed by reference in C:\xampp\htdocs\signup\data.php on line 7 errorinsert into signup(image, name, fname, add, contact, email, aadhar, qual, degress, ad, psw, con_psw) values ('WIN_20170922_22_30_15_Pro.jpg','bdhcbhdcbh','hbdvj,','bjkbsv','1254789635','hunggu@gmail.com','125478963025','cs e','WIN_20170922_22_30_15_Pro.jpg','fd ','1234fed','1234fed') You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'add, contact, email, aadhar, qual, degress, ad, psw, con_psw) values ('WIN_20170' at line 1
Что я уже пробовал:
<?php if(isset ($_POST['Signup'])) { $file_name = $_FILES['image']['name']; $file_tmp =$_FILES['image']['tmp_name']; $file_ext=strtolower(end(explode('.',$_FILES['image']['name']))); $a=$_POST['image']; $b=$_POST['name']; $c=$_POST['fname']; $d=$_POST['add']; $e=$_POST['contact']; $f=$_POST['email']; $g=$_POST['ano']; $h=$_POST['qual']; $i=$_POST['mimage']; $j=$_POST['aod']; $k=$_POST['psw']; $l=$_POST['psw-repeat']; $sql="insert into signup(image, name, fname, add, contact, email, aadhar, qual, degress, ad, psw, con_psw) values ('$a','$b','$c','$d','$e','$f','$g','$h','$i','$j','$k','$l')"; //store image in folder //$folder="/xampp/htdocs/signup/image/"; //move_uploaded_file($_FILES["myimage"]["tmp_name"], "$folder".$_FILES["myimage"]["name"]); move_uploaded_file($file_tmp,"/xampp/htdocs/signup/image/".$file_name); if($conn->query($sql)===TRUE) { echo"You are eligible"; } else { echo "error".$sql."<br>".$conn->error; } //session start //session_start(); //storing session data //$_SESSION["NAME"]="$b"; //access session data //echo $_SESSION["NAME"]; // Removing session data //if(isset($_SESSION["NAME"])){ // unset($_SESSION["NAME"]); } //destroy session //session_destroy(); //session end mysqli_close($conn); ?>