Probleme formulaire de contact php
Fermé
Raphael
-
3 mai 2007 à 14:18
bg62 Messages postés 23560 Date d'inscription samedi 22 octobre 2005 Statut Modérateur Dernière intervention 4 novembre 2023 - 3 mai 2007 à 14:29
bg62 Messages postés 23560 Date d'inscription samedi 22 octobre 2005 Statut Modérateur Dernière intervention 4 novembre 2023 - 3 mai 2007 à 14:29
A voir également:
- Probleme formulaire de contact php
- Easy php - Télécharger - Divers Web & Internet
- Formulaire de réclamation facebook - Guide
- Contact chaud - Forum Consommation & Internet
- J&m contact - Forum Consommation & Internet
- Créer un groupe whatsapp sans contact - Guide
2 réponses
probleme formulaire de contact php
<tr><td>Votre Nom:</td>
<td><input type=text name=realname size=30></td></tr>
<tr><td>Votre Email:</td>
<td><input type=text name=email size=30></td></tr>
<tr><td>Sujet:</td>
<td><input type=text name=title size=30></td></tr>
<tr><td colspan=2>Commentaires:<br>
<textarea COLS=50 ROWS=6 name=comments></textarea>
</td></tr>
</table>
<br> <input type=submit value=Envoyer> -
<input type=reset value=Annuler>
</form>
</div>
Quand on click sur envoyer ca passe par une page php, qui donne ca :
<!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 http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Document sans titre</title>
</head>
<body>
<?php
$TO = "raphaelheslot@yahoo.fr";
$h = "From: " . $TO;
$message = "";
while (list($key, $val) = each($HTTP_POST_VARS)) {
$message .= "$key : $val\n";
}
mail($TO, $subject, $message, $h);
Header("Location: http://rh2007.free.fr/merci.html");
?>
</body>
</html>
Donc avec logique le Header devrai me renvoyer vers ma page merci.html non ?
J'ai trouve ces codes source sur un forum mais y avait pas d explication.
Merci de votre aide!!!
Raphael
raphaelheslot@yahoo.fr
<tr><td>Votre Nom:</td>
<td><input type=text name=realname size=30></td></tr>
<tr><td>Votre Email:</td>
<td><input type=text name=email size=30></td></tr>
<tr><td>Sujet:</td>
<td><input type=text name=title size=30></td></tr>
<tr><td colspan=2>Commentaires:<br>
<textarea COLS=50 ROWS=6 name=comments></textarea>
</td></tr>
</table>
<br> <input type=submit value=Envoyer> -
<input type=reset value=Annuler>
</form>
</div>
Quand on click sur envoyer ca passe par une page php, qui donne ca :
<!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 http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Document sans titre</title>
</head>
<body>
<?php
$TO = "raphaelheslot@yahoo.fr";
$h = "From: " . $TO;
$message = "";
while (list($key, $val) = each($HTTP_POST_VARS)) {
$message .= "$key : $val\n";
}
mail($TO, $subject, $message, $h);
Header("Location: http://rh2007.free.fr/merci.html");
?>
</body>
</html>
Donc avec logique le Header devrai me renvoyer vers ma page merci.html non ?
J'ai trouve ces codes source sur un forum mais y avait pas d explication.
Merci de votre aide!!!
Raphael
raphaelheslot@yahoo.fr
wesrush
Messages postés
1280
Date d'inscription
vendredi 10 novembre 2006
Statut
Membre
Dernière intervention
2 janvier 2008
39
3 mai 2007 à 14:29
3 mai 2007 à 14:29
tu travailles sous dreaweaver??
quand tu as inseré ton btn_envoyer dans dream tu as bien selectionné ta balise form et dans action tu tapes la "destination" aprés saisie du bouton envoyé?
quand tu as inseré ton btn_envoyer dans dream tu as bien selectionné ta balise form et dans action tu tapes la "destination" aprés saisie du bouton envoyé?
3 mai 2007 à 14:29
essaie ceci:
https://www.unesourisetmoi.info/formulaires/index.php
normalement tu ne devrais pas avoir de problèmes
@+
b g