Formulaire PHP
Fermé
Utilisateur anonyme
-
10 nov. 2010 à 18:40
Lord Zero Messages postés 459 Date d'inscription lundi 18 octobre 2010 Statut Membre Dernière intervention 15 juin 2018 - 10 nov. 2010 à 19:12
Lord Zero Messages postés 459 Date d'inscription lundi 18 octobre 2010 Statut Membre Dernière intervention 15 juin 2018 - 10 nov. 2010 à 19:12
A voir également:
- Formulaire PHP
- Easy php - Télécharger - Divers Web & Internet
- Formulaire de réclamation facebook - Guide
- Récupérer compte hotmail sans formulaire ✓ - Forum Hotmail / Outlook.com
- Formulaire remboursement frais de résiliation free pdf ✓ - Forum Vos droits sur internet
- Formulaire rempli - Guide
2 réponses
Lord Zero
Messages postés
459
Date d'inscription
lundi 18 octobre 2010
Statut
Membre
Dernière intervention
15 juin 2018
115
10 nov. 2010 à 19:12
10 nov. 2010 à 19:12
support.html
-----------------------------------------------------
envoiesupport.php
<!DOCTYPE html PUBLIC "-//W3C//Dtd XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/Dtd/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta content="text/html; charset=utf-8" http-equiv="Content-Type" /> <title>Support</title> </head> <body> <form name="form1" method="post" action="envoisupport.php"> <table> <tr> <td>Pseudo:</td> <td><input name="pseudo" style="width: 180px" type="text" /></td> </tr> <tr> <td>Sujet:</td> <td><input name="sujet" style="width: 180px" type="text" /></td> </tr> <tr> <td>Texte:</td> <td><textarea id="message" name="message" style="height: 118px; width: 401px"></textarea></td> </tr> <tr> <td><input name="Submit1" type="submit" value="Envoyer" /></td> <td><input name="Reset1" type="reset" value="Effacer" /></td> </tr> </table> </form> </body> </html>
-----------------------------------------------------
envoiesupport.php
<!DOCTYPE html PUBLIC "-//W3C//Dtd XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/Dtd/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta content="text/html; charset=utf-8" http-equiv="Content-Type" /> <title>Mail Envoyé</title> </head> <body> <?php //Récupération des variables $pseudo = $_POST['pseudo']; $sujet = $_POST['sujet']; $texte = $_POST['message']; //on convertie les caractètres HTML du message $texte = htmlentities($texte); //mise en forme du mail $message = "Pseudo : $pseudo \n Sujet : $sujet \n Message : $texte \n "; if( mail('adresse ou tu veut recevoir',$sujet,$message) ){ echo 'Votre Mail a bien été transmis !'; } else{ echo 'une erreur est survenu lors de l\'envoi du message'; } ?> </body> </html>