Formulaire mail en php
wilou
-
aminosoft -
aminosoft -
Bonjour. Sur mon site web j'ai créé un formulaire utilisant la fonction mail qui permet auxgens de s'inscrire en remplissant les champs nom, prenom, etc... Quand ils valident le formulaire je reçois directement les infos dans ma boite aux lettres. Cependant je voudrais ajouter un champ photo avec un bouton "parcourir" afin de leur permettre de m'envoyer aussi une photo. Pouvez-vous m'envoyer un script a ce propos??? Merci d'avance...
A voir également:
- Formulaire mail en php
- Whatsapp formulaire opposition - Guide
- Formulaire de réclamation facebook - Guide
- Windows live mail - Télécharger - Mail
- Publipostage mail - Accueil - Word
- Formulaire de reclamation instagram - Guide
2 réponses
Salut !
Voici un lien qui va surement t'aider, ca te permet d'uploader un fichier sur ton serveur d'hebergement, et donc de facilement le joindre en fichier attaché au mail, ou mieux encore, en regardant ici http://www.commentcamarche.net/forum/affich.php3?cat=3&ID=338119&page=1 tu pourras formatter ton mail au format HTML pour insérer ton image et faire une belle fiche utilisateur inscrit !!!
A pluche !
http://php3.hebergement-discount.com/upload.html
Voici un lien qui va surement t'aider, ca te permet d'uploader un fichier sur ton serveur d'hebergement, et donc de facilement le joindre en fichier attaché au mail, ou mieux encore, en regardant ici http://www.commentcamarche.net/forum/affich.php3?cat=3&ID=338119&page=1 tu pourras formatter ton mail au format HTML pour insérer ton image et faire une belle fiche utilisateur inscrit !!!
A pluche !
bonjour
puisque vous etes arrivé a creer un formulaire mail , donc vous pouver m'aider
voila j'ai créer un script mais ca marche pas .
voila le script html et php
<table width="500" border="0" cellspacing="0" cellpadding="0">
<form action="envoi.php" method="post" enctype="application/x-www-form-urlencoded" name="formulaire">
<tr>
<td colspan="3">Envoyer un message</td>
</tr>
<tr>
<td><div align="right">Votre nom</div></td>
<td colspan="2"><input type="text" name="nom" size="45" maxlength="100"></td>
</tr>
<tr>
<td width="17%"><div align="right">Votre mail</div></td>
<td colspan="2"><input type="text" name="mail" size="45" maxlength="100"></td>
</tr>
<tr>
<td><div align="right">Sujet :</div></td>
<td colspan="2"><input type="text" name="objet" size="45" maxlength="120"></td>
</tr>
<tr>
<td><div align="right">Message :</div></td>
<td colspan="2"><textarea name="message" cols="50" rows="10"></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>
le script php ------------------------------------
<?php
$nom=$HTTP_POST_VARS['nom'];
$mail=$HTTP_POST_VARS['mail'];
$objet=$HTTP_POST_VARS['objet'];
$message=$HTTP_POST_VARS['message'];
/////voici la version Mine
$headers = "MIME-Version: 1.0\r\n";
//////ici on détermine le mail en format text
$headers .= "Content-type: text/plain; charset=iso-8859-1\r\n";
////ici on détermine l'expediteur et l'adresse de réponse
$headers .= "From: $nom <$mail>\r\nReply-to : $nom <$mail>\nX-Mailer:PHP";
$subject="$objet";
$destinataire="moi@mail.com";
$body="$message";
if (mail($destinataire,$subject,$body,$headers)) {
echo "Votre mail a été envoyé";
} else {
echo "Une erreur s'est produite";
}
?>
puisque vous etes arrivé a creer un formulaire mail , donc vous pouver m'aider
voila j'ai créer un script mais ca marche pas .
voila le script html et php
<table width="500" border="0" cellspacing="0" cellpadding="0">
<form action="envoi.php" method="post" enctype="application/x-www-form-urlencoded" name="formulaire">
<tr>
<td colspan="3">Envoyer un message</td>
</tr>
<tr>
<td><div align="right">Votre nom</div></td>
<td colspan="2"><input type="text" name="nom" size="45" maxlength="100"></td>
</tr>
<tr>
<td width="17%"><div align="right">Votre mail</div></td>
<td colspan="2"><input type="text" name="mail" size="45" maxlength="100"></td>
</tr>
<tr>
<td><div align="right">Sujet :</div></td>
<td colspan="2"><input type="text" name="objet" size="45" maxlength="120"></td>
</tr>
<tr>
<td><div align="right">Message :</div></td>
<td colspan="2"><textarea name="message" cols="50" rows="10"></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>
le script php ------------------------------------
<?php
$nom=$HTTP_POST_VARS['nom'];
$mail=$HTTP_POST_VARS['mail'];
$objet=$HTTP_POST_VARS['objet'];
$message=$HTTP_POST_VARS['message'];
/////voici la version Mine
$headers = "MIME-Version: 1.0\r\n";
//////ici on détermine le mail en format text
$headers .= "Content-type: text/plain; charset=iso-8859-1\r\n";
////ici on détermine l'expediteur et l'adresse de réponse
$headers .= "From: $nom <$mail>\r\nReply-to : $nom <$mail>\nX-Mailer:PHP";
$subject="$objet";
$destinataire="moi@mail.com";
$body="$message";
if (mail($destinataire,$subject,$body,$headers)) {
echo "Votre mail a été envoyé";
} else {
echo "Une erreur s'est produite";
}
?>