Search
Left Quote    Knowledge speaks, but wisdom listens.
- Jimi Hendrix    
Right Quote
 
[login] | [Register]
Forum Index » PHP and mySQL » Viewing Topic and Replies
Post Reply


        Viewing Topic: password
  This user is offline  Badgett
  Subject: "password" Posted: @ 7:40 am on Jun 02 2007   
Member #: 330
Rank: User - (7)
Since: 05/23/07
Posts: 7

I'm having some problems...
everything seems to work fine except my password length code

Code:
function check_password( $pass,$confirm_ pass) {
global $msg;

if($pass != $confirm_pass) {
$msg .= "<br> ;<b>The passwords do not match</b> <br>" ;; return false; }
if(strlen($pass ) < 6 ) {
$msg .= "<br> ;<b>Your password is too short.<br> ;Must be 6 or more characters in length<br> ;</b>&quo t;;
return false;
}
return true;
}



thought the code could be simple enough but still shows up as an error.
I checked the post codes over and over and the form names and pretty much everything
help?


    Viewed: 5,726 Times | Reply to This | To top
  This user is offline  bs0d
  Subject: "re: password" Posted: @ 3:06 pm on Jun 02 2007    

Member #: 1
Rank: Admin. - (1,505)
Since: 02/06/05
Posts: 600
From: USA




-bs0d | AllSyntax.com

    Viewed: 5,718 Times | Reply to This | To top
  This user is offline  badgett
  Subject: "re: password" Posted: @ 8:24 am on Jun 03 2007    
Member #: 330
Rank: User - (7)
Since: 05/23/07
Posts: 7

nothing is wrong with that way, just kinda too simple for the site I'm building. I figured it out though. I just mistaken confirm with confrim.
also the .= adds to the variable instead of changing it.
so when I have other errors instead of just changing it it adds it
$msg .= "error1& quot;
$msg .= "error2& quot;

$msg outputs error1error2
$msg = "error1& quot;
$msg = "error2& quot;

$msg outputs error2




    Viewed: 5,706 Times | Reply to This | To top
Viewing Page: 1 of 1


1 |

You must be logged in to post on the forums. Login or Register








"AllSyntax.com" Copyright © 2002-2018; All rights lefted, all lefts righted.
Privacy Policy  |  Internet Rank