GOOGLE

aku nok ndi : /home/astwardha/public_html/astwardha/astwardha.in/polylibrary/
File Up :
aku nok ndi : /home/astwardha/public_html/astwardha/astwardha.in/polylibrary/changepass.php

<?php
//Include the database configuration file
include 'dbcon.php';
if(isset($_POST['paasordedit'])){
        extract($_POST);
        $pass=mysql_query("SELECT * FROM `registration` WHERE `password`='".md5($_POST['oldpass'])."' AND `id`='".$_SESSION['user_id']."'");
            $rowss=mysql_fetch_array($pass); 
                  echo $rowss['password'];
                  if($rowss['password']!=md5($_POST['oldpass'])){?>
                  <script>
                    alert("Old Password not Match");
                    window.location.href='users.php';
                  </script>
                  <?php echo $rowss['password']; }else{
                    if($newpass==$cpass){ ?>
                    <?php
                         echo $update = mysql_query("UPDATE `registration` SET `password`='".md5($_POST['newpass'])."',`pasword_hint`='".$_POST['newpass']."' WHERE `id`='".$_SESSION['user_id']."'");
                         if($update){
                            ?>
                            <script>
                    alert("Old Password not Match");
                    window.location.href='users.php';
                  </script>
                            <?php
                         }
                    }

                  } 
              }
?>

Copyright © 1945 - 2024 GOOGLE