Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- if($_POST) {
- $username = $_POST["username"];
- $password = $_POST["password"];
- $confirm_password = $_POST["confirm_password"];
- if(empty($passowrd) || empty($confirm_password) || empty($username)) {
- exit("Blank fields.");
- }
- if($password != $confirm_password) {
- exit("Passwords do not match.");
- }
- $password = hash('whirlpool', $data);
- mysql_query("UPDATE `users` SET `password`='$password' WHERE `username`='$username'");
- }
- ?>
- <form name="testing" method="post" action="test.php">
- <label for="username">Username:</label> <input type="text" name="username" /><br />
- <label for="password">New Password:</label> <input type="text" name="password" /><br />
- <label for="confirm_password">Confirm New Password:</label> <input type="text" name="confirm_password" /><br /><br />
- <input type="submit" value="Submit" name="submit" />
- </form>
Add Comment
Please, Sign In to add comment