Bonjour, j'aimerai savoir comment on peut pré-remplir le champ sujet ou message s'il vous plait ? merci d'avance.
Mes scripts :
monenvoi.php
mesquestions.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
16
17
18
19 <?php $nom=$HTTP_POST_VARS['nom']; $mail=$HTTP_POST_VARS['mail']; $objet=$HTTP_POST_VARS['objet']; $message=$HTTP_POST_VARS['message']; $headers = "MIME-Version: 1.0\r\n"; $headers .= "Content-type: text/plain; charset=iso-8859-1\r\n"; $headers .= "From: $nom <$mail>\r\nReply-to : $nom <$mail>\nX-Mailer:PHP"; $subject="$objet"; $destinataire="aurlemonnier@gmail.com"; $body="$message"; if (mail($destinataire,$subject,$body,$headers)) { echo '<meta http-equiv="refresh" content=0;url=mesquestions2.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
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40 <html> <head> <link rel="stylesheet" href="definipage.css" type="text/css"> </head> <body VLINK="#F5A0B8" ALINK="#F5A0B8" LINK="#F5A0B8"> <html> <head> <link rel="stylesheet" href="definipage.css" type="text/css"> </head> <body VLINK="#F5A0B8" ALINK="#F5A0B8" LINK="#F5A0B8"> <table width="550" border="0" align="center" cellpadding="0" cellspacing="5"> <form action="monenvoie.php" method="post" enctype="application/x-www-form-urlencoded" name="formulaire"> <tr><td></td></tr> <tr><td></td></tr> <tr><td></td></tr> <tr><td></td></tr> <tr><td colspan="3"><strong> <font color="#000000">Tu as une question à me poser, des suggestions? N'hésite pas ;) </font></strong></td></tr> <tr><td></td></tr> <tr><td></td></tr> <tr><td></td></tr> <tr><td></td></tr> <tr><td><div align="left">Votre nom :</div></td> <td colspan="2"><input type="text" name="nom" size="45" maxlength="120"></td></tr> <tr><td width="17%"><div align="left">Votre mail :</div></td> <td colspan="2"><input type="text" name="mail" size="45" maxlength="120"></td></tr> <tr><td><div align="left">Sujet : </div></td> <td colspan="2"><input type="text" name="objet" size="45" maxlength="120"></td></tr> <tr><td><div align="left">Message : </div></td> <td colspan="2"><textarea name="message" cols="46" rows="5"></textarea></td></tr> <tr><td></td> <td width="42%"><center><input type="reset" name="Submit" value="Réinitialiser le formulaire"></center></td> <td width="41%"><center><input type="submit" name="Submit" value="Envoyer"></center></td></tr> </form></table></p> </body> </html>
Partager