0

can i check is there any wrong with this?
it prompted me error in line 5
Parse error: syntax error, unexpected T_IF

<?php 
session_start()
if (!(isset($_SESSION['email']) && $_SESSION['email'] != '')) {
header ("Location: login.php");
}
4
Contributors
6
Replies
7
Views
5 Years
Discussion Span
Last Post by issaru07
0

Firstly, the line number mentioned in the error message is just where you start looking for a problem. You then work BACKWARDS through your script. The error message is saying it found an unexpected IF statement. This means the error is just before the IF statement. Look closely at the line above it (line 2 in this case).

0

Yes have a look at the end of line 2. It's missing something.

0

... there was always gonna be one... :)

0

@ardav he never marked it as "Solved", so I figure the person was too lazy to solve your riddle. Stupid semi-colons!

0

@ardav he never marked it as "Solved", so I figure the person was too lazy to solve your riddle. Stupid semi-colons!

thanks! so careless of me.. thanks everyone here..

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.