Question: i can not find the error in my code to move the image to the folder the folder is in the same location as the
i can not find the error in my code to move the image to the folder
the folder is in the same location as the codes files
if(isset($_POST["sub"])) {
move_uploaded_file($_FILES["image"]["tmp_name"], "img/" . $_FILES["image"]["name"]);
$con = new mysqli("localhost", "root","", "voluntary"); $st = $con->prepare("insert into post(productName,productDetails,image,name) values(?,?,?,?)"); $st->bind_param("ssss", $_POST["pn"], $_POST["pd"],$_POST["image"],$_SESSION["name"]); $st->execute(); echo '';
}
?>
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
