$leg=substr($stade,0,1);
mysql_connect($server,$user,$password);
mysql_select_db($base);
$result=mysql_query("SELECT * FROM $table WHERE mail='$mail'");
$nbre_rangs=mysql_num_rows($result);
if ($nbre_rangs == 1)
{
echo "$tauxn";
echo "$frp";
$modif=mysql_query("UPDATE $table SET stade='$stade', nom='$nom', prenom='$prenom', adresse_postale='$adresse', mail='$mail', telephone='$tel', mise_a_jour='$maj', taux_nature='$tauxn',frais_b='$frb', frais_n='$frn', frais_p='$frp', legende='$leg'' WHERE nom='$nom'");
if (!$modif)
{ return(FALSE); }
}
else
{
$modif1=mysql_query("INSERT INTO $table(stade, nom, prenom, adresse_postale, mail, telephone, mise_a_jour, taux_nature, frais_b, frais_n, frais_p, legende, reponse, motif) VALUES ('$stade', '$nom','$prenom', '$adresse','$mail','$tel','$maj','tauxn','$frb','$frn','$frp','$leg','$reponse','$motif')");
if (!$modif1)
{ return(FALSE); }
}
?>
Partager