1 2 3 4 5 6 7 8 9 10 11 12 13 14
| function FormulaireContact($user_contact, $nom_contact, $prenom_contact, $email_contact, $societe_contact, $sujet_contact, $message_contact) {
if($email_contact == '' || !eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*$",$email_contact)) { $erreur['email_contact'] = 1; }
if($sujet_contact == '') { $erreur['sujet_contact'] = 1; }
if($message_contact == '') { $erreur['message_contact'] = 1; }
if(count($erreur) == 0) {
$date = $this->GetDate();
$heure = $this->GetHeure();
//mysql_query("INSERT INTO contact VALUES('', '$user_contact', '$nom_contact', '$prenom_contact', '$societe_contact', '$email_contact', '$sujet_contact', '$message_contact', '$date', '$heure', 'En attente')");
return true;
}
else {
return $erreur;
}
} |
Partager