Get support from Xavier Media
It is currently Sun Dec 08, 2013 12:24 pm

All times are UTC




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Parse error
PostPosted: Sun Oct 11, 2009 11:11 pm 
Offline
Rookie (I'm probably spamming)
Rookie (I'm probably spamming)

Joined: Sun Oct 11, 2009 11:03 pm
Posts: 3
Points: 0
Hello, I am getting a parse error on line 10 and I can't seem to figure out why. Any suggestions? Also, is there anything wrong with my regular expression?
Thanks a ton!

function validPassword($pw){
$pw=$_POST['PassWord'];
if (strlen($pw)< 8) || (strlen($pw)> 20) (This is line 10)
return false;
else if (ereg("[A-Z]{1,}", $pw) && (ereg("[0-9]{1,}", $pw)))
return true;
else
return false;


Report this post
Top
 Profile Send private message E-mail  
Reply with quote  
 Post subject: Re: Parse error
PostPosted: Sun Oct 11, 2009 11:13 pm 
Offline
Rookie (I'm probably spamming)
Rookie (I'm probably spamming)

Joined: Sun Oct 11, 2009 11:03 pm
Posts: 3
Points: 0
Toroid wrote:
Hello, I am getting a parse error on line 10 and I can't seem to figure out why. Any suggestions? Also, is there anything wrong with my regular expression?
Thanks a ton!

function validPassword($pw){
$pw=$_POST['PassWord'];
if (strlen($pw)< 8) || (strlen($pw)> 20) (This is line 10)
return false;
else if (ereg("[A-Z]{1,}", $pw) && (ereg("[0-9]{1,}", $pw)))
return true;
else
return false;


Smily face should have been an 8 )


Report this post
Top
 Profile Send private message E-mail  
Reply with quote  
 Post subject: Re: Parse error
PostPosted: Mon Oct 12, 2009 4:07 am 
Offline
XavierForum.com Admin
XavierForum.com Admin
Super VIP Member
Super VIP Member
User avatar

Joined: Tue Mar 15, 2005 4:37 pm
Posts: 1082
Location: Sweden
Points: 1500
It loks like you have one ) too little at the end of that line.

_________________
Xavier Media®
Join me at LinkedIn | Get your latest blog post in your signature you too


Report this post
Top
 Profile Send private message  
Reply with quote  
 Post subject: Re: Parse error
PostPosted: Mon Oct 12, 2009 4:15 am 
Offline
Rookie (I'm probably spamming)
Rookie (I'm probably spamming)

Joined: Sun Oct 11, 2009 11:03 pm
Posts: 3
Points: 0
bylla wrote:
It loks like you have one ) too little at the end of that line.

Thanks, you are right!

Now...I'm getting another error saying parse error, expecting T-string or T-variable... on line 21 on the code below:

function isValid(){
if
(This is line 21) (filledOut("$_POST['StudentFirstname']") && filledOut("$_POST['StudentLastName']") && filledOut("$_POST['PassWord']")
&& filledOut("$_POST['CompanyName']") && filledOut("$_POST['SupervisorFirstName']") && filledOut("$_POST['SupervisorLastName']")
&& validPassword("$_POST['PassWord']"))
return true;
else
return false;
}


Report this post
Top
 Profile Send private message E-mail  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC


Who is online

Registered users: No registered users


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Portal » Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
[
SEO MOD © 2007 StarTrekGuide ]