Bonjour,
Voilà mon souci, j'aimerai sur mon futur site faire une page contact où l'utilisateur pourra m'envoyer son nom, prénom, mail et le message.
Voici mon fichier contact.html:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-15" /> </head> <body> <form method="post" action="formulaire.html"> Nom:<input name="nom"><br/> Prénom:<input name="prenom"><br/> Mail:<input name="mail"><br/> Message:<textarea name="message" rows="20" cols="20">Tapez votre message ici</textarea><br/> <input type="submit" value="envoie"><br/> </form> </body> </html>
et voici mon fichier formulaire.html:
je pense que c'est dans ce dernier fichier qu'il y a un problème... mais je ne sais comment m'y prendre....en fait quand je clique sur le bouton submit je vois bien qu'il passe au formulaire mais c'est tout.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-15" /> </head> <body> <?php if($submit) { $recipient="marioncardot@phrsarl.fr"; $header="From: ".$mail. "\n"; $mail_body.="Nom: ".$nom."\n"; $mail_body.="Prénom: ".$prenom."\n"; mail($recipient, $mail_body, $header); } ?> </body> </html>
tout ça est bien sur avec wamp
merci de vos aides et solutions....




Répondre avec citation


Partager