<?php include("auth.php");?>
<?php include("header.php");?>




<?php 
include("dbcon.php");
error_reporting(~E_NOTICE);

if(isset($_POST["update"])) {
	$email = $_POST["email"];
	$password= $_POST["password"];
	$query = mysqli_query($db,"update user set password='$password' WHERE email='".$_SESSION['email']."'");
    $msg ="Updated Successfully";
    }

	


?>

<?php 
               error_reporting(~E_NOTICE);
include("dbcon.php");
 $sql="SELECT * FROM user WHERE email='".$_SESSION['email']."'";
                 $result = mysqli_query($db,$sql);
                while ($row = mysqli_fetch_array($result)) 
{
 
    ?>
<div class="content-body">
            <!-- row -->
           
			<div class="container-fluid">
            <h3>My Profile</h3>
           <p> <?php echo $msg;?></p>
            <form method ="POST" action="">
            <label>New Password</label>
            <input type="text" name="password" class="form-control" style="width:300px;"><br>
           <button type="submit" name="update" class="btn btn-primary">Change Password</button>
</form>
                

</div>

</div>
<?php
}
?>

<?php include("footer.php");?>