We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
//connect to the data base $db = mysqli_connect("*****","******","******","******"); $username = $_POST['name']; $userstore = $_POST['store']; $userlati = $_POST['lati']; $userlongi = $_POST['longi']; $storecategory = $_POST['category']; $userpho = $_POST['phone']; $useremail = $_POST['email']; $image = $_FILES['image']['name']; $sql = "INSERT INTO genral (username,store_name,latitude,longitude,category,user_phone,user_email,userimage) VALUES ('$username','$userstore','$userlati','$userlongi','$storecategory','$userpho','$useremail','$image')"; mysqli_query($db,$sql); //store data into db if(move_uploaded_file($_FILES['image']['tmp_name'],$target)){ $msg = "DATA UPLOADED SUCCESFULLY"; }else{ $msg = "DATA NOT UPLOADED SUCCESFULLY"; }
} ?> PHP code to connect
PHP code to connect
The text was updated successfully, but these errors were encountered:
Can you suggest example to connect to mysql
Sorry, something went wrong.
How to move uploaded image to folder showing error while uploading inside /images folder
Hi @RishiPratap. You're doing it right from my point of view. Follow the error.
No branches or pull requests
//connect to the data base $db = mysqli_connect("*****","******","******","******"); $username = $_POST['name']; $userstore = $_POST['store']; $userlati = $_POST['lati']; $userlongi = $_POST['longi']; $storecategory = $_POST['category']; $userpho = $_POST['phone']; $useremail = $_POST['email']; $image = $_FILES['image']['name']; $sql = "INSERT INTO genral (username,store_name,latitude,longitude,category,user_phone,user_email,userimage) VALUES ('$username','$userstore','$userlati','$userlongi','$storecategory','$userpho','$useremail','$image')"; mysqli_query($db,$sql); //store data into db if(move_uploaded_file($_FILES['image']['tmp_name'],$target)){ $msg = "DATA UPLOADED SUCCESFULLY"; }else{ $msg = "DATA NOT UPLOADED SUCCESFULLY"; }
}
?>
PHP code to connect
The text was updated successfully, but these errors were encountered: