PDA

View Full Version : radio panel problems



:Lively
01-10-2006, 05:22 PM
hi, currently im using dentafrices radio panel.

however wen i try 2 change my password etc, it works with no errors, but dunt add it 2 da database. Its the same with everyfink else.

Anyone??

Jackboy
01-10-2006, 05:39 PM
It may be because of different php versions, but i doubt it...

It'll help me and others who don't use "Dentafrice's DJ Panel" if you could copy and paste the code for the update password pages. Then we can assist u

:Lively
01-10-2006, 05:49 PM
<? session_start();
include 'dbConfig.php';
$ip = $_SERVER['REMOTE_ADDR']; //get the ip of the current user
if(!isset($_SESSION['session_username']) || empty($_SESSION['session_username']) || $ip!= $_SESSION['session_ip']) {
//if the username is not set or the session username is empty or the ip does not match the session ip log them out
session_unset(); //clears firefox
session_destroy(); //clears IE
echo "ERROR!!!";
exit; } ?>

<?
if($action == "change") {

if(!$password_cng) { echo "<b>You must enter a new password!</b>"; exit; }
$password_cng = md5($password_cng);
$user = $_SESSION['session_username'];
$query = mysql_query("UPDATE `staff` SET password='$password_cng' WHERE username='$user'") or die(mysql_error());
echo "<font face=verdana size=1>Password Changed";

} else {
echo "
<form method=post action=\"$PHP_SELF?action=change\">
<table border=\"0\">
<tr><td><font size=\"1\" face=\"Verdana\">Password: <td><input name=\"password_cng\"></td></tr>
<tr><td></td><td><input type=submit value=\"Change Password\" accesskey=\"s\"></td></tr>
</table>
</form>"; }
?><body bgcolor="#3366CC">

when i try and change the pw, it just goes back to the main password change screen :(

n yes the database is connected properly

Jackboy
01-10-2006, 05:54 PM
Errr. Have i read this wrong..

Basically ur inserting $password_chng or w/e

and well i can't see where its been defined...

should be



$password_chng = $_POST[password_chng];


Or w/e it is.... Tell me if im wrong but im sure im right lol

Want to hide these adverts? Register an account for free!