hey guys i found a tutorial but the script does not seem to work and i can't figure it out?
it gives me on top og the page this
0){ echo "Image has been inserted succesfully"; } else { echo "Image can not be inserted check your submission"; } } else { echo "This is not a true image type"; } } ?>
like if there is missing a { or; somewere?
PHP Code:
<?
mysql_connect("localhost", "root", "") or die(mysql_error());
mysql_select_db("image") or die(mysql_error());
/*
This function take the image from form variables
*/
$query = "INSERT INTO images_table VALUES('NULL','$imgName','$uploadedImage')";
$result = mysql_query($query);
if(mysql_affected_rows() > 0){
echo "Image has been inserted succesfully";
}
else {
echo "Image can not be inserted check your submission";
}
}
else {
echo "This is not a true image type";
}
}
?>