Forum Moderators: coopster

Message Too Old, No Replies

parse error, unexpected T BOOLEAN OR in

         

adammc

5:39 am on Jul 11, 2006 (gmt 0)

10+ Year Member



Hi Guys,

I got the error below when running this code. I am trying validate that both files (picture & thumb) are jpg or gif images.

Parse error: parse error, unexpected T_BOOLEAN_OR in .....

[php]

// Validate the type. Should be jpeg, jpg, or gif.
$allowed = array ('image/gif', 'image/jpeg', 'image/jpg', 'image/pjpeg');
if (in_array($_FILES['picture']['type'], $allowed)) ¦¦ (in_array($_FILES['thumb']['type'], $allowed))
{

// If all is ok begin picture uploading

[/php]

Can anyone offer any advice, thank you :)

dreamcatcher

6:25 am on Jul 11, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi adammc,

Your parenthesis is all wrong. Try this:

if (in_array($_FILES['picture']['type'], $allowed) ¦¦ in_array($_FILES['thumb']['type'], $allowed))

dc