desjardins2010 Posted December 8, 2010 Share Posted December 8, 2010 <?php echo "<h1>Register</h1>"; $submit =$_POST['submit']; //form data $fullname =strip_tags($_POST['fullname']); $email =strip_tags($_POST['email']); $username =strip_tags($_POST['username']); $password =strip_tags($_POST['password']); $password2 =strip_tags($_POST['password2']); if ($submit) { if ($fullname&&$email&&$username&&password&&password2) { //setting md5 standard $password = md5($password); $password2 = md5($password2); //check to see if the passwords match if (strlen($password==$password2) { //check char length of username and fullname if (strlen($username)>25||strlen($fullname)>25) { else echo "Your Username or Fullname is above the 25 character limit"; } else { //check that password is larger than 6 chars and smaller than 25 if (strlen($password)>25||strlen($password)<6) { echo "Your password must be 6-25 characters in lenght!"; } else { //register user } } { else { echo "The passwords entered do not match"; } } else echo "Please fill in <b>all</b> spaces provided"; } ?> <html> <p> <form action='register.php' method="post"> <table> <tr> <td> Your Full Name: </td> <td> <input type="text" name="fullname"> </td> </tr> <tr> <td> Email Address: </td> <td> <input type="text" name="email"> </td> <tr> <td> Choose Username: </td> <td> <input type="text" name="username"> </td> </tr> <tr> <td> Password: </td> <td> <input type="password" name="password"> </td> </tr> <tr> <td> Retype Password: </td> <td> <input type="password" name="password2"> </td> </tr> </table> <p> <input type="submit" name="submit" value="Register"> </form> Link to comment https://forums.phpfreaks.com/topic/221068-parse-error/ Share on other sites More sharing options...
desjardins2010 Posted December 8, 2010 Author Share Posted December 8, 2010 oooppss so i'm getting a parse error on line 27 and I don't see why? Link to comment https://forums.phpfreaks.com/topic/221068-parse-error/#findComment-1144706 Share on other sites More sharing options...
Buddski Posted December 8, 2010 Share Posted December 8, 2010 if (strlen($username)>25||strlen($fullname)>25) { else Might point you in the right direction. Link to comment https://forums.phpfreaks.com/topic/221068-parse-error/#findComment-1144708 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.