1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
| if(!empty($_GET['email']))
{
$reponse = mysql_query("SELECT MAIL_CLIENT FROM client where MAIL_CLIENT= '" . $_GET["email"]. "' ");
echo mysql_num_rows($reponse);
if(mysql_num_rows($reponse) > 0)
{
while($row = mysql_fetch_array($reponse))
{
if( $_GET["email"] == $row["MAIL_CLIENT"])
{
$mes="Désolé mais un client possède déjà cet email";
}
}
}
else{
$pass=md5($_GET['pass']);
mysql_query("insert into client (ID_client, MAIL_CLIENT, PASSWORD_CLIENT) values('','" . $_GET["email"]. "','$pass')");
$mes=" Bravo ! Inscription réalisée avec succès";
}
echo '<h3>'.$mes.'.</h3>';
} |