I'm creating a form and want to insert the user's data along with a random profile image, but my data is not inserting in phpMyAdmin.
I'm using sublime text-editor.
if(empty($error_array)) {
$password = md5($password);
$rand = rand(1, 2);
if($rand == 1)
$profile_pic = "E:/xampp/htdocs/social/assets/images/profile_pics/defaults/head_emerald.png";
else if($rand == 2)
$profile_pic = "E:/xampp/htdocs/social/assets/images/profile_pics/defaults/head_deep_blue.png";
$query = mysqli_query($con, "INSERT INTO users VALUES ('', '$fname', '$em', '$password', '$date', '$profile_pic', '0', '0', 'no', ',')"); ```
}
My data is not being inserted into my database.