The first part works already perfectly

And just wanted to make similar approach for password entry in the reset.php part so I did following:
Code: Select all
//Show a html form with a password field and a submit button
if (!isset($_POST['password'])) {
echo '
<div class="container">
<link rel="stylesheet" href="style.css" >
<form method="post" action="reset.php">
Enter New Password:
<input type="password" name="password" size="35" />
<div class="send-button">
<input type="submit" value="Reset My Password" />
</div>
</form>
</div>
';
exit();
}
include("../resetpw/nuconfig.php");
$password = isset($_POST['password']) ? trim($_POST['password']) : '';
echo $password;
//Connect to MySQL database using PDO.
$pdo = new PDO("mysql:host=$nuConfigDBHost;dbname=$nuConfigDBName", $nuConfigDBUser, $nuConfigDBPassword);
//The user's id, which should be present in the GET variable "uid"
$userId = isset($_GET['uid']) ? trim($_GET['uid']) : '';
......

Do you have some suggestions what should I do here?