Page 1 of 1

Error with Valid? syntax

Posted: Fri Dec 01, 2006 1:32 pm
by danharibo
I try to run this:

Code: Select all

$sql = "INSERT INTO contacts (fullname, Age, DOB, mf, Religion, Nationality, Height, HairColor, EyeColor,FacialFeatures, Tatoos, Bio, PICTURE)
and php returns an error, nothing specific but its on that line, i can't see anything wrong with it.

Posted: Fri Dec 01, 2006 1:35 pm
by danharibo
Now i get an error on last line (24)

Code: Select all

if(isset($_FILES['file']))
{
move_uploaded_file ($_FILES['file'] ['tmp_name'],
       "./uploads/"$_FILES['file'] ['name'])
}

Posted: Fri Dec 01, 2006 1:50 pm
by Fractal
You're missing a . before $_FILES and after the "

Posted: Fri Dec 01, 2006 1:58 pm
by danharibo
now i'm getting an error at the }

Posted: Fri Dec 01, 2006 2:00 pm
by Fractal
danharibo wrote:now i'm getting an error at the }
You're also missing the semi-colon

Posted: Fri Dec 01, 2006 2:02 pm
by danharibo
Its there now..

Posted: Fri Dec 01, 2006 5:43 pm
by volka
If php tells you "on line xyz" the cause of the error can be on that line ...or before.
Therefore
danharibo wrote:now i'm getting an error at the }
tells us almost nothing.

Posted: Fri Dec 01, 2006 7:24 pm
by Fractal
volka wrote:If php tells you "on line xyz" the cause of the error can be on that line ...or before.
Therefore
danharibo wrote:now i'm getting an error at the }
tells us almost nothing.
The MySQL problem would be a good example in that case, otherwise.. The other error generally means you're missing a parenthese, square bracket, or curly bracket.

From my experience anyway.