
<?php
session_start();
if(!isset ($_SESSION['faisal']))
{
	header('location:error.php');
}
else
{
	include('connect.php');
	$username=$_SESSION['faisal'];
	$password=$_POST['password'];
	
	$sql="update l2 set password='$password' where username='$username'";
	
	$result=mysqli_query($con,$sql);
	
	if ($result)
	{
		echo "<b>Password Changed Successfully </b>";
	echo '<a href="logout.php">LOGOUT</a>';
	}
	else
	{
		echo "Password Not Changed";
	}
	
}
?>