Ok I’m looking for a PHP Change Password Script that works with a login system I got from a tutorial the users table is actually calls TZ_members for reasons I don’t know and because of that its extremely hard to find one that works. If anyone knows one that easy to edit and simple I’d love a link thanks
well what is your session called when they login, what is the users id field called in the tz_members table? here is a shot at the dark with a simple one:
[php]
if(isset($_POST[‘password’])){
$a=mysql_query(“select password from tz_members where id={$_SESSION[‘id’]}”);
$b=mysql_fetch_assoc($a);
if($_POST[‘oldpassword’]!=$b[‘password’]){die(“Old Password did not match with the database”);}
if($_POST[‘password’]!=$_POST[‘password2’]){die(“New Passwords did not match”);}
mysql_query(“update tz_members set password=$password where id={$_SESSION[‘id’]}”);
}
Please repeat it :
[/php] you take care of styling and all that jazz!!! ;D