Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Eudemons Online > EO PServer Hosting
You last visited: Today at 22:14

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



website change password

Discussion on website change password within the EO PServer Hosting forum part of the Eudemons Online category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Mar 2009
Posts: 263
Received Thanks: 117
website change password

This is not working it says your password has been changed but it dosent load it in the DB whats wrong?

Code:
<?php
include('config.php');
?>
<?php
if($_POST['user']){
mysql_select_db($mydbacc);
					$userid = trim($_POST['id']);
					$password=trim($_POST['pass']);
					$passretype=trim($_POST['repass']);
					$hash=$_POST['hash'];
					$hash1=$_POST['hash1'];
					$cpass = trim($_POST['cpass']);
					$sql = "SELECT * FROM account WHERE name='$userid'";
					$query = mysql_query($sql) or die(mysql_error());
					$row = mysql_fetch_object($query);
					$curpass = htmlspecialchars($row->password);
					$secretquestion = htmlspecialchars($row->secret_question);
					$secretanswer = htmlspecialchars($row->secret_answer);
					$email = htmlspecialchars($row->email);
$res = mysql_query("select * from account where name = '".$userid."' order by id desc");
								if(mysql_num_rows($res) == 0)
								{
								Echo "Sorry that username doesnt exist";
								}else{
							echo "
							<form method=\"post\" action=\"changepw1.php\">
<TABLE align=\"center\">
<tr><td>
<br />
Enter the correct info and your password will be changed. For the email, it will be the one you used to sign up with.<tr><td>
<tr><td align=\"center\">Login Name:</tr></td>
<tr><td align=\"center\"><input type=\"text\" size=\"20\" name=\"userc\"/></tr></td>
<tr><td align=\"center\">Current Password:</tr></td>
<tr><td align=\"center\"><input type=\"hidden\" name=\"hash1\">
<input type=\"password\" size=\"20\" name=\"curpass\" onBlur=\"hash1.value=login(curpass.value)\"/></tr></td>
<tr><td align=\"center\">New Password:</td></tr>
<tr><td align=\"center\"><input type=\"password\" size=\"20\" name=\"newpas\"/></td></tr>
<tr><td align=\"center\">Retype New Password:</td></tr>
<tr><td align=\"center\"><input type=\"password\" size=\"20\" name=\"renew\"/></td></tr>
<tr><td align=\"center\">
<input type=\"hidden\" name=\"hash\"><input class=Butt type=submit onClick=\"hash.value = login(newpas.value)\" value=\"Change Password\" name=B1>
</td></tr>
</TABLE>
</form>
							";
							}//end else
}
?>
<?php
			if($_POST['B1'])
			{
			mysql_select_db($myaccount);
					$userid = trim($_POST['userc']);
					$password=trim($_POST['curpass']);
					$passretype=trim($_POST['repass']);
					$hash=$_POST['hash'];
					$hash1=$_POST['hash1'];
					$newpass = trim($_POST['newpas']);
					$renewpass = trim($_POST['renew']);
					$sql = "SELECT * FROM account WHERE name='$userid'";
					$query = mysql_query($sql) or die(mysql_error());
					$row = mysql_fetch_object($query);
					$curpass = htmlspecialchars($row->password);

$res = mysql_query("select * from account where name = '".$userid."' order by id desc");
								if(mysql_num_rows($res) == 0)
								{
								Echo "Sorry that username doesnt exist";
								}else{
				if($hash1 != $curpass)
					{
						echo "Your current password was typed wrong";
					}
					else{
					if($newpass != $renewpass)
					{
						echo "Your New paswords dont match";
					}
					else{
					$sql = "UPDATE account SET password='$hash' WHERE name='$userid'";
					$query = mysql_query($sql) or die(mysql_error());

									echo "Password Changed correctly ";


					}


					}

}
}

			?>
shadowkiller990 is offline  
Old 05/18/2011, 06:21   #2
 
Jack Sparrow's Avatar
 
elite*gold: 0
Join Date: Nov 2009
Posts: 522
Received Thanks: 628
Code:
<script type="text/javascript" src="inc/md5.js"></script>
<?php
include('config.php');
  ?>
<form method="post">
<TABLE align="center">
<tr><td>
<br />
Enter the correct info and your password will be changed. For the email, it will be the one you used to sign up with.<tr><td>
<tr><td align="center">Login Name:</tr></td>
<tr><td align="center"><input type="text" size="20" name="userc"/></tr></td>
<tr><td align="center">Current Password:</tr></td>
<tr><td align="center"><input type="hidden" name="hash1">
<input type="password" size="20" name="curpass" onBlur="hash1.value=login(curpass.value)"/></tr></td>
<tr><td align="center">New Password:</td></tr>
<tr><td align="center"><input type="password" size="20" name="newpas"/></td></tr>
<tr><td align="center">Retype New Password:</td></tr>
<tr><td align="center"><input type="password" size=\"20\" name="renew"/></td></tr>
<tr><td align="center">
<input type="hidden" name="hash"><input class=Butt type=submit onClick="hash.value = login(newpas.value)" value="Change Password" name=B1>
</td></tr>
</TABLE>
</form>

<?php
			if($_POST['B1'])
			{
			mysql_select_db($mydbacc);
					$userid = trim($_POST['userc']);
					$password=trim($_POST['curpass']);
					$passretype=trim($_POST['repass']);
					$hash=$_POST['hash'];
					$hash1=$_POST['hash1'];
					$newpass = trim($_POST['newpas']);
					$renewpass = trim($_POST['renew']);
					$sql = "SELECT * FROM account WHERE name='$userid'";
					$query = mysql_query($sql) or die(mysql_error());
					$row = mysql_fetch_object($query);
					$curpass = htmlspecialchars($row->password);

$res = mysql_query("select * from account where name = '".$userid."' order by id desc");
								if(mysql_num_rows($res) == 0)
								{
								Echo "Sorry that username doesnt exist";
								}else{
				if($hash1 != $curpass)
					{
						echo "Your current password was typed wrong";
					}
					else{
					if($newpass != $renewpass)
					{
						echo "Your New paswords dont match";
					}
					else{
					$sql = "UPDATE account SET password='$hash' WHERE name='$userid'";
					$query = mysql_query($sql) or die(mysql_error());

									echo "Password Changed correctly ";


					}


					}

}
}

			?></div>
give this a try works pretty fine for me
Jack Sparrow is offline  
Thanks
1 User
Old 05/18/2011, 06:29   #3
 
elite*gold: 0
Join Date: Mar 2009
Posts: 263
Received Thanks: 117
Thank you so much for helping once again =-D
shadowkiller990 is offline  
Reply


Similar Threads Similar Threads
Change Password
05/12/2012 - SRO Private Server - 4 Replies
Any1 can say me how can i change password?..thx
Password Change
10/18/2009 - Metin2 PServer Guides & Strategies - 12 Replies
So hab hier nen Password Change script falls ihr ohne große Schwierigkeiten das pw von den accounts auf eurem server bzw. falls ihr euren Usern die möglichkeit geben wollt ihr pw zu ändern. Genauso wie den Regiscript von xBlooMx in xampp rein mehr nicht. Danke an nico_w für die hilfe als ich probleme hatte. PS: Bitte unten das © nicht entfernen mehr will ich nicht.
password change
09/07/2009 - Silkroad Online - 2 Replies
hello, i played iSRO along time ago , i wanted to change the password, but i cant remember my secret answer, i know everything except secret answer, can anyone help me? because maybe i read or maybe wrong about new pw change system of silkroad, i think i read that there is a way to change pw by only knowing ID/PW and email?
Change Password
03/14/2009 - Conquer Online 2 - 2 Replies
can anyone Post Script co for Change Passowrd but when change password i want only old password and new password not data
Change password
03/09/2008 - SRO Private Server - 4 Replies
How can i change password ... except reg.525u.net because that doesn't work



All times are GMT +1. The time now is 22:15.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.