after i key-in the form, the function change the whole column with the same value for example if i put first name JOHN it will update whole column with JOHN
<?php
session_start();
require_once("connection.php");
if (isset($_POST['edit']))
{
session_start();
$s=mysqli_query($con,"UPDATE user SET first_name ='" . $_POST['first_name'] . "'");
$row = mysqli_fetch_assoc($s);
if ($s)
{ $_SESSION['user_name']=$_POST['user_name'];
$_SESSION['first_name']=$_POST['first_name'];
echo "<script type='text/javascript'>alert('Successful - Record Updated!'); window.location.href = 'profile.php';</script>"; }
else
{ echo "<script type='text/javascript'>alert('Unsuccessful - ERROR!'); window.location.href = 'profile.php';</script>"; }
}
?>