<?php
include('../include/config.php');
//error_reporting(0);
session_start();
//$iduser=$_SESSION['user_id'];
if(isset($_POST['gender']))
{ 
$nom =addslashes($_POST['nom']);    
$gen =addslashes($_POST['gender']);

$sql=mysqli_query($con,"UPDATE pupils SET Gender='$gen' where count='$nom'");
if($sql)
{
echo "Successfully saved";
}else
{
echo "Unable to update data";	
}
}
?>