GB_001 Posted November 26, 2007 Share Posted November 26, 2007 It's shortening my md5 encrypted passwords to 30 characters, please help. Thankyou. My registry code: <?php @mysql_connect("localhost", "gb_GB", "***********") or die(mysql_error()); @mysql_select_db("gb_USERInfo") or die(mysql_error()); $firstname = $_POST['firstname']; $lastname = $_POST['lastname']; $email = $_POST['email']; $aboutme = $_POST['aboutme']; $interests = $_POST['interests']; $pword = md5($_POST['password']); $emailedpass = $_POST['password']; $checkuser = mysql_query("SELECT email FROM Ysers WHERE email='$email'"); $email_exist = mysql_num_rows($checkuser); if($email_exist > 0){ echo "I'm sorry but the email you specified is already in use."; unset($email); include 'Register.html'; exit(); }else{ $query = "INSERT INTO Ysers (firstname, lastname, email, aboutme, interests, password) VALUES('$firstname', '$lastname', '$email', '$aboutme', '$interests', '$pword')"; mysql_query($query) or die(mysql_error()); mysql_close(); echo "You have successfully Registered."; $site = "www.gbchat.elementfx.com"; $webmaster = "info@gbchat"; $semail = "info@gbchat.elementfx.com"; $subject = "You have successfully registered at $site..."; $message = "Dear $firstname, you are now registered at gbchat. To login, simply go to our web page and enter in the following details in the login form: Username: $email Password: $emailedpass Please print this information out and store it for future reference. Thanks, $webmaster"; mail($email, $subject, $message, "From: $site <$semail>\nX-Mailer:PHP/" . phpversion()); echo " Your information has been mailed to your email address."; echo $pword; } ?> Quote Link to comment Share on other sites More sharing options...
revraz Posted November 26, 2007 Share Posted November 26, 2007 Check the field length in the DB and make sure its not set to 30 chars. PHPmyadmin doesn't cut down anything, its just a interface into your DB. Quote Link to comment Share on other sites More sharing options...
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.