<?php session_start();
if(empty($_SESSION['id'])):
header('Location:../index.php');
endif;

include('../dist/dbcon.php');
	$id = $_SESSION['id'];
	$fullname =$_POST['fullname'];
	$email =$_POST['email'];
	$password =$_POST['password'];

	mysqli_query($con,"update users set fullname='$fullname',email='$email',password='$password' where id='$id'")or die(mysqli_error());
	
	echo "<script type='text/javascript'>alert('Successfully updated User Profile!');</script>";
	echo "<script>document.location='user.php'</script>";  

	
?>