View Single Post
Old 01-07-2013, 10:59 AM   PM User | #10
djm0219
Senior Coder

 
djm0219's Avatar
 
Join Date: Aug 2003
Location: Wake Forest, North Carolina
Posts: 1,229
Thanks: 2
Thanked 190 Times in 188 Posts
djm0219 is on a distinguished road
Quote:
Originally Posted by Mehdi72 View Post
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

__________________
Dave .... HostMonster for all of your hosting needs
djm0219 is offline   Reply With Quote