parse 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
JKwingsfan
Forum Newbie
Posts: 1
Joined: Sun Jan 09, 2005 12:43 pm

parse error, unexpected T_IF

Post by JKwingsfan »

Let's start by saying I am not a huge fan of PHP. I don't like it, I love JavaScript, but it would be impossible to do what I need to do with JavaScript. I have this stupid error, parse error, unexpected T_IF, I don't know what it means php.net isn't much help, I am in need of assistance :evil: Here is the line of code its P & M'ing about:

if ($password == $confirm) {
print "The second typing of your password does not match your first";
}

I have made sure that the variables are defined, I have tried writing the if statement every single possible different way, IT DOESN'T WORK :evil: :!: What the hell does it mean and how do i fix it?
magicrobotmonkey
Forum Regular
Posts: 888
Joined: Sun Mar 21, 2004 1:09 pm
Location: Cambridge, MA

Post by magicrobotmonkey »

Post some code from before the if statement, thats where the error is.
User avatar
protokol
Forum Contributor
Posts: 353
Joined: Fri Jun 21, 2002 7:00 pm
Location: Cleveland, OH
Contact:

Post by protokol »

Also, saying you hate PHP might not make people here want to help answer your questions.
d3ad1ysp0rk
Forum Donator
Posts: 1661
Joined: Mon Oct 20, 2003 8:31 pm
Location: Maine, USA

Post by d3ad1ysp0rk »

Nah, I just find it amusing since PHP is supier in most ways to JS ;) lol
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

might have been nice to post this is the proper forum too.. Moved to PHP - Code.
User avatar
n00b Saibot
DevNet Resident
Posts: 1452
Joined: Fri Dec 24, 2004 2:59 am
Location: Lucknow, UP, India
Contact:

Post by n00b Saibot »

i am 100% sure you have forgotten to put a semi-colon on the line above this statement. check it and say what happens :!:
Post Reply