Jump to content
MakeWebGames

Recommended Posts

Posted

Ok well i have done this before with an old game but have just recently got back into coding i no what the problem is bu6t just not how to fix it.

if ($_POST ['oldpw] != $ir [userpass'] )

I would remember md5 going around there somwhere just not sure where i should put it :-)

0.o I firgued it now but thanks for looking

Posted

Re: Password change

if ($_POST['oldpw'] != $ir['userpass'])

might help if that's what you had in your script

-------------------------------------------------

this changes password on ours..

function pass_change()

{

global $ir,$c,$userid,$h;

print "<h3><u>Password Change</u></h3><form action='preferences.php?action=passchange2' method='post'>

Current Password: <input type='password' name='oldpw' />

New Password: <input type='password' name='newpw' />

Confirm: <input type='password' name='newpw2' />

<input type='submit' value='Change Password' /></form>

> Back";

}

function do_pass_change()

{

global $ir,$c,$userid,$h;

if($_POST['oldpw'] != $ir['userpass'])

{

print "The current password you entered was wrong.

> Back";

}

else if($_POST['newpw'] !== $_POST['newpw2'])

{

print "The new passwords you entered did not match!

> Back";

}

else

{

mysql_query("UPDATE users SET userpass='{$_POST['newpw']}' WHERE userid=$userid");

print "Password changed!

> Back";

}

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...