Something
public text v1 · immutablefunction ajouter_slashes($texte)
{
if(get_magic_quotes_gpc() === 1)
{
$texte = stripslashes($texte);
}
return mysql_real_escape_string($texte); //une connexion à mysql doit exister avant
}
$req='UPDATE user SET ';
$c=0;
if(isset($_POST['user_nom']))
{
$user_nom = ajouter_slashes(htmlentities($_POST['user_nom']));
$c++;
$req.='user_nom="'.$user_nom.'"';
}
if($c>0)
{
$req.=' WHERE user_pseudo="'.$_SESSION['pseudo'].'"';
include 'classe_mysql.php';
}