Parse error: syntax error, unexpected T_IF

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
cjermain
Forum Newbie
Posts: 12
Joined: Wed Jun 01, 2005 6:11 pm

Parse error: syntax error, unexpected T_IF

Post by cjermain »

Hey what does this error mean?? What wrong with my code??

Error:

Parse error: syntax error, unexpected T_IF in c:\Inetpub\wwwroot\work\company\display.php on line 3


Code:

Code: Select all

<?php include('includes/connect.php')

if (empty($_GET['url'])) {

$url=false;

} else {

$url=true;

}

?>
Thanks!
-Colin J

d11wtq |

Code: Select all

tags please..... [/color]
method_man
Forum Contributor
Posts: 257
Joined: Sat Mar 19, 2005 1:38 am

Post by method_man »

first of all
use php tags

Code: Select all

<?php
include('includes/connect.php')

if (empty($_GET['url'])) {

$url=false;

} else {

$url=true;

}

?>
hongco
Forum Contributor
Posts: 186
Joined: Sun Feb 20, 2005 2:49 pm

Post by hongco »

check error on your display.php file
User avatar
Skara
Forum Regular
Posts: 703
Joined: Sat Mar 12, 2005 7:13 pm
Location: US

Post by Skara »

you're missing a ; at the end of the include statement. Check a few lines before and after the error line before posting for help. ;)
hongco
Forum Contributor
Posts: 186
Joined: Sun Feb 20, 2005 2:49 pm

Post by hongco »

Skara wrote:you're missing a ; at the end of the include statement. Check a few lines before and after the error line before posting for help. ;)
:lol:
User avatar
cjermain
Forum Newbie
Posts: 12
Joined: Wed Jun 01, 2005 6:11 pm

Post by cjermain »

Yea thats it.

Thanks!
-Colin J
Post Reply