tags:

views:

35

answers:

2

Hi,

I get the following error;

Parse error: syntax error, unexpected T_STRING in D:\XAMPP\xampp\htdocs\site\register.php on line 95

Line 95 is;

if (strstr($email, "@") && strstr($email, ".") strlen($email) >=6))

Please help, I don't know what's wrong :/ It all looks fine to me.

Thanks In Advance!

+3  A: 

You forgot an operator before your strlen() call. Also, you have an extra ) at the end.

BoltClock
+2  A: 

The syntax error occurs at this position:

if (strstr($email, "@") && strstr($email, ".") strlen($email) >=6))
                                               ^

Furthermore you have one closing parenthesis but no corresponding opening parenthesis:

if (strstr($email, "@") && strstr($email, ".") strlen($email) >=6))
                                                                  ^

What you probably meant:

if (strstr($email, "@") && strstr($email, ".") && strlen($email) >= 6)

Or:

if (strstr($email, "@") && strstr($email, ".") && (strlen($email) >= 6))
Gumbo
Well, it fixed that.. But now I get another new error :/unexpected T_ELSE on line 102I'll try and figure that one out myself, thanks though! :)
Hugo