Jump to content

Recommended Posts

Posted

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????

Posted

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.

Posted

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

Posted

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

Posted
it's like a new geeky workld out there :D , 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:p

Posted
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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...