Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $username = $_GET["user"];
- $oldpassword = $_POST['old-password'];
- $password = $_POST['password'];
- $secpassword = $_POST['sec-password'];
- include ("connect.php") ;
- mysql_select_db("cms-neerup", $con) ;
- $result = mysql_query("SELECT * FROM brugere WHERE Brugernavn = '$username'");
- $row = mysql_fetch_array($result) ;
- echo $row['Password'] ;
- if ($oldpassword == $row['Password']) {
- if($password == $secpassword) {
- mysql_query("UPDATE brugere SET Password=".$password." WHERE Brugernavn=$username) OR die(mysql_error());
- echo "Dit gamle password er $oldpassword </bh>";
- echo "Dit nye password $password " ;
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement