include("../../sql.inc.php");
if ($adresse_email){
while (list($key, $val) = each($HTTP_POST_VARS)) {$champ[$key]=addslashes($val);}
$resultat=mysql_query("select nom,prenom,date_adh,email from sobanova where email='$adresse_email'");
$row=mysql_fetch_row($resultat);
if ($row[2]==0){echo "
You are not a member or the address mail is different that the address mail you used when you became a member";
}else{
echo $form;
$query="UPDATE sobanova SET st16=1,langue=1 where email='$adresse_email' and date_adh<>0";
$result=mysql_query($query);
echo "
Thank you, you are registered for our disco dance class on Sunday 13 April 2008. See you soon
";
$to="sophie@sobanova.com";
$subject="Subscription for disco dance class on April 13 ";
$body="Bonjour,\n\n";
$body.="$row[0] $row[1] $row[3] is registered for dance class on April 13.\n";
$body.="pour le cours de $champ[choix]\n\n";
$body.="Cordialement,\n\n";
$body.="Robot Sobanova";
$headers="From: Sobanova";
mail ($to,$subject,$body,$headers);
}
}else {?>
Subscriptionform
Disco Dance Class
Sunday 13 April 2008
Association Sobanova
14 villa Saint Charles 75015 Paris FRANCE