thegman89 Posted August 13, 2005 Report Posted August 13, 2005 Hi, I have created a script that allows users to login to a 'private' area of my site. However, I getting this error all the time: Parse error: parse error, unexpected '{' in homepages/41/d129487955/htdocs/other/phptest/login.php on line 53 I have checked the code around line 53 and cannot see a problem (although i am a beginner so I might not of spoted a mistake :-) ) you can view the script here (zip file). can anyone hlp me? please???? Quote
mmmlordy Posted August 13, 2005 Report Posted August 13, 2005 usually this means that you have left out a { or have one to many.....can be an easy mistake to make. Quote
mmmlordy Posted August 13, 2005 Report Posted August 13, 2005 after looking at the script i think you need to close you elseif statement on line 52 so change to..... elseif ($num ==0) // login name not found havnt done php for a while so may not be correct, give it a go though. Quote
simonr Posted August 13, 2005 Report Posted August 13, 2005 And you need a " at the end of line 28. I reckon you probably meant 0 instead of o on line 32, and Login instead of Loign on line 38. Plus, all the places where you've tried to include something like $_POST[fusername] in an SQL statement, I think you need to take it out of the quotes, so for example, WHERE loginName='$_POST[fusername]'"; would become WHERE loginName='" . $_POST[fusername] . "'"; Same with VALUES ('$logname','$today')";, etc. This is so that it doesn't think you just want to write out $logname, you want to write out the value it holds. (I haven't used PHP for a long time though, so I dont know if this is still necessary, they might have changed that) Didn't read it all, just what I noticed at first, so reply here if you need more help Quote
thegman89 Posted August 13, 2005 Author Report Posted August 13, 2005 Thanks guys, that solved that problem, I will post here again if I get stuck again! Quote
ZoMbooLio Posted August 13, 2005 Report Posted August 13, 2005 it's like a new geeky workld out there , great going guys, now would anyone care to explain in SIMPLE terms wtf that was all about? Quote
sn0rkle Posted August 14, 2005 Report Posted August 14, 2005 Well, each different programming language has its own "Syntax", this is the way in which you write down what you want the program to do. This is very similar to the way different languages each have different Grammar. The way you write down something in English and in German can be different. What happend above is kind of the equivilient of: Help!, i cant get this sentance to work!: "I want to sea a lot of furnitures in a shop, but i don.t know wear to go?" Hmm didnt you mean: "I want to see a lot of furniture in a shop, but I don't know where to go!" Ahh, thanks. It works know! Hope that made sense Matt Quote
mmmlordy Posted August 14, 2005 Report Posted August 14, 2005 it's like a new geeky workld out there , great going guys, now would anyone care to explain in SIMPLE terms wtf that was all about? in the simplest terms... his web page broke.....now its fixed :p:p:p Quote
ZoMbooLio Posted August 14, 2005 Report Posted August 14, 2005 Well, each different programming language has its own "Syntax", this is the way in which you write down what you want the program to do. This is very similar to the way different languages each have different Grammar. The way you write down something in English and in German can be different. What happend above is kind of the equivilient of: Help!, i cant get this sentance to work!: "I want to sea a lot of furnitures in a shop, but i don.t know wear to go?" Hmm didnt you mean: "I want to see a lot of furniture in a shop, but I don't know where to go!" Ahh, thanks. It works know! Hope that made sense Matt That makes pretty good sense actually! thanks Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.