Use KP 2.

Use KP 2.
It would grab the second.I understand that, but what I'm saying he has $password2 twice. He then inserts the value of $password2 as the pass... which I'm sure it reads the first (correct me if I'm wrong I'm not the best coder as you know...) so it'd grab the first $password2 and insert? Or the second...?
Meh.Correct me pls!
Don't go mental if it doesn't work.PHP Code:<?php
if(isset($_SESSION['EON_CNTPNL_USERNAME'])){
$check->login();
}else{
session_start();
include("functions.php");
$check = new checklogin;
$check->login();
}
echo("
<b>Edit your password!</b><br/>
<br/>");
if($_GET["act"] == "update")
{
$password = clean($_POST['password']);
$password = md5($password);
$password = sha1($password);
mysql_query("UPDATE `users` SET `password` = '" . $password . "' WHERE `username` = '" . $_SESSION['EON_CNTPNL_NAME'] . "'") or die(mysql_error());
echo("Password Updated");
exit;
}
else
{
$rand = generateRandStr(13);
echo("Please set a new password:<br/><form action=\"?page=editpass&act=update\" method=\"POST\"><input type=\"text\" name=\"password\" value=\"$rand\" class=\"formbox\"> <b><-- Suggested</b><br/><br/><input type=\"submit\" name=\"submit\" value=\"Change Password\"><br/><br/>
The suggested password was $rand<br/>(So you can copy and paste)</form>");
}
?>
i've been here for over 8 years and i don't know why
Members who have read this thread: 0Want to hide these adverts? Register an account for free!