Quote:
Originally Posted by Mehdi72
Parse error: syntax error, unexpected T_STRING in imageupload.php on line 36
Code:
if ($image_size==FALSE)
echo "That's not an image.";
else
{
if ($insert = mysql_query("INSERT INTO databaseimage VALUES ('','$image_name',LOAD_FILE($file)))
echo "Problem uploading image";
else
Don't I need to declare the file variable?
|
That you do and you need to fix the syntax of the snippet you posted. Instead of using code tags use PHP tags and it'll become pretty obvious what is wrong a good portion of the time.
PHP Code:
if ($image_size==FALSE) {
echo "That's not an image.";
} elseif ($insert = mysql_query("INSERT INTO databaseimage VALUES ('','$image_name',LOAD_FILE($file)")) {
echo "Problem uploading image";
} else {
// do something else here if you need to
}