Hello, This is my first post here. I have been working with php as a hobbyist for a couple of years, but have never setup a site that requires passwords. I have gone through the "Memebership System" tutorial with great success (I think ;) ). My problem comes in when I try to add a page for the user to change their password. My code is below. For some reason the email address doesn't get carried over from the form. I get the message about forgetting the email address knucklehead. this is my pwchange.php and change_pw.html is below that. [code]<?php session_start(); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title> Automated </title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <link href="images2/style.css" rel="stylesheet" type="text/css" /> </head> <body> <div id="HEADER"> <?php include "./common/header.php"; ?> </div> <!-- header --> <div id="PATH"> <p><a href="#">Home</a></p> </div> <!-- PATH --> <div id="SIDEBAR"> <h2>RECENT NEWS</h2> <p class="Date">August 17, 2006</p> <p>The Dream Begins. I registered it.</p> <p class="More"><a href="#">Read More</a></p> <h2>Members</h2> <p></p> <p></p> <p></p> </div> <!-- sidebar --> <div id="CONTENT"> <? include './common/db.php'; switch($_POST['change']){ default: include 'change_pw.html'; break; case "change": change_pw($_POST['email_address'], $POST['password']); break; } function change_pw($email_address, $password){ if(!$email_address){ echo "You forgot to enter your Email address, <strong>Knucklehead</strong><br />"; include 'change_pw.html'; exit(); } if(!$password){ echo "You forgot to enter your new password, <strong>Knucklehead</strong><br />"; include 'change_pw.html'; exit(); } // quick check to see if record exists $sql_check = mysql_query("SELECT * FROM users WHERE email_address='$email_address'"); $sql_check_num = mysql_num_rows($sql_check); if($sql_check_num == 0){ echo "No records found matching your email address<br />"; include 'change_pw.html'; exit(); } $db_password = md5($password); $sql = mysql_query("UPDATE users SET password='$db_password' WHERE email_address='$email_address'"); $subject = "Your Password!"; $message = "Hi, you have changed your password. New Password: $password Thanks! The Webmaster This is an automated response, please do not reply!"; mail($email_address, $subject, $message, "From: Webmaster<admin@mydomain.com>n X-Mailer: PHP/" . phpversion()); echo "Your password has been sent! Please check your email!<br />"; include 'login_form.html'; } ?> </div> <!-- content --> <div id="FOOTER"> <?php include "./common/footer.php"; ?> </div> <!-- footer --> </body> </html>[/code] this is the change_pw.html [code]<form method="post" action="pwchange.php"> Email Address: <input class="text" value="<?php echo $email_address; ?>" name="email_address"><br /> New Password: <input type="password" value="" name="password"><br /> <input type="hidden" name="change" value="change"><br /> <input type="submit" value="Submit Form"> <input type="reset" value="Reset Form"> </form>[/code]