Convert line endings from MAC to UNIX
[php-addressbook.git] / register / reset_password_save.php
index 539b85f..67d455b 100644 (file)
@@ -1,40 +1,80 @@
-<?\r\r
-include"master_inc.php";\r\r
-\r\r
-$username=$_REQUEST['username'];\r\r
-$password=$_REQUEST['password'];\r\r
-$password_confirm=$_REQUEST['password_confirm'];\r\r
-$password_hint = $_REQUEST['password_hint'];\r\r
-$email=$_REQUEST['email'];\r\r
-\r\r
-if($password==$password_confirm){\r\r
-\r\r
-\r\r
-$pw = strip_tags(substr($_POST['password'],0,32));\r\r
-       \r\r
-$cleanpw = md5($pw);\r\r
-\r\r
-//Debug: echo"New User Defined PW: $cleanpw<br>email = $email | username = $username<br>";\r\r
-\r\r
-$query = "UPDATE `users` SET `password`='$cleanpw', `password_hint`='$password_hint' WHERE `email`='$email'"; \r\r
-\r\r
-// save the info to the database\r\r
-$results = mysqli_query( $query );\r\r
-\r\r
-// print out the results\r\r
-if( $results )\r\r
-\r\r
-{ echo( "<font size='2' face='Verdana, Arial, Helvetica, sans-serif'>Your changes have been made sucessfully.<br><br><a href='login.php'>Back to Login</a></font>  " );\r\r
-}\r\r
-else\r\r
-{\r\r
-die( "<font size='2' face='Verdana, Arial, Helvetica, sans-serif'>Trouble saving information to the database:</font> " . mysqli_error() );\r\r
-}\r\r
-\r\r
-}\r\r
-else\r\r
-{\r\r
-echo"<font size='2' face='Verdana, Arial, Helvetica, sans-serif'>Your new passwords do not match.  <a href='reset_password.php?email=$email'>Please try again</a>";\r\r
-}\r\r
-\r\r
-?>\r\r
+<?
+\r
+include"master_inc.php";
+\r
+
+\r
+$username=$_REQUEST['username'];
+\r
+$password=$_REQUEST['password'];
+\r
+$password_confirm=$_REQUEST['password_confirm'];
+\r
+$password_hint = $_REQUEST['password_hint'];
+\r
+$email=$_REQUEST['email'];
+\r
+
+\r
+if($password==$password_confirm){
+\r
+
+\r
+
+\r
+$pw = strip_tags(substr($_POST['password'],0,32));
+\r
+       
+\r
+$cleanpw = md5($pw);
+\r
+
+\r
+//Debug: echo"New User Defined PW: $cleanpw<br>email = $email | username = $username<br>";
+\r
+
+\r
+$query = "UPDATE `users` SET `password`='$cleanpw', `password_hint`='$password_hint' WHERE `email`='$email'"; 
+\r
+
+\r
+// save the info to the database
+\r
+$results = mysqli_query( $query );
+\r
+
+\r
+// print out the results
+\r
+if( $results )
+\r
+
+\r
+{ echo( "<font size='2' face='Verdana, Arial, Helvetica, sans-serif'>Your changes have been made sucessfully.<br><br><a href='login.php'>Back to Login</a></font>  " );
+\r
+}
+\r
+else
+\r
+{
+\r
+die( "<font size='2' face='Verdana, Arial, Helvetica, sans-serif'>Trouble saving information to the database:</font> " . mysqli_error() );
+\r
+}
+\r
+
+\r
+}
+\r
+else
+\r
+{
+\r
+echo"<font size='2' face='Verdana, Arial, Helvetica, sans-serif'>Your new passwords do not match.  <a href='reset_password.php?email=$email'>Please try again</a>";
+\r
+}
+\r
+
+\r
+?>
+\r