votre formulaire formmail |
|
| Voir le sujet précédent :: Voir le sujet suivant |
| Auteur |
Message |
graffx frontpage mioche
 |
votre formulaire formmail , Posté le: 25-09-2006 23:18 |
|
|
Bonjour
J' essaie de m' interesser un peu au html.
J essaie de faire un site web.
J' ai mis ce formulaire à cette adresse www.graffx.fr/contact.htm [http://www.graffx.fr/contact.htm]
Il marche bien, je recois le mail, mais la redirection est naze.
Je ne comprend pas trop pourquoi puisque le code est nickel.
Je tombe bien sur ma page (je vois le menu en haut) mais au milieu de la page il devrait y avoir: message envoyé etc etc.
Quand je regarde le code source via IE, effectivement, il manque cette ligne (message envoyé) tout en bas de la page. La page semble bien etre merci.htm
Ca fait deux heures que j essaie de reparer mais la je vois pas ce qui ennuie. A savoir que j ai un peu de javascript dans mes pages mais je les ai normalement viré pour voir si ce n etait pas le probleme, aparement non.
FORMMAIL.PHP
| Citation: |
<!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>Bienvenue sur Graffx.fr</title>
</head>
<body>
<table width="100%" height="125" border="0" cellpadding="0" cellspacing="0" background="images/bglogo.gif">
<tr>
<td height="101" valign="top" background="if"><div align="center"><img src="images/banniere.gif" width="800" height="97" /></div></td>
</tr>
<tr>
<td height="26">
<div align="center">
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="100" height="20">
<param name="BGCOLOR" value="#84759f" />
<param name="movie" value="button1.swf" />
<param name="quality" value="high" />
<embed src="button1.swf" width="100" height="20" quality="high" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" bgcolor="#84759f" ></embed>
</object>
<img src="images/blank.gif" width="10" height="5" />
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="100" height="20">
<param name="BGCOLOR" value="#84759f" />
<param name="movie" value="button2.swf" />
<param name="quality" value="high" />
<embed src="button2.swf" width="100" height="20" quality="high" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" bgcolor="#84759f" ></embed>
</object>
<img src="images/blank.gif" width="10" height="5" />
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="100" height="20">
<param name="movie" value="button3.swf" />
<param name="quality" value="high" />
<param name="bgcolor" value="#84759f" />
<embed src="button3.swf" quality="high" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="100" height="20" bgcolor="#84759f"></embed>
</object>
<img src="images/blank.gif" width="10" height="5" />
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="100" height="20">
<param name="movie" value="button4.swf" />
<param name="quality" value="high" />
<param name="bgcolor" value="#84759f" />
<embed src="button4.swf" quality="high" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="100" height="20" bgcolor="#84759f"></embed>
</object>
<img src="images/blank.gif" width="10" height="5" />
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="100" height="20">
<param name="movie" value="button5.swf" />
<param name="quality" value="high" />
<param name="bgcolor" value="#84759f" />
<embed src="button5.swf" quality="high" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="100" height="20" bgcolor="#84759f"></embed>
</object>
</div></td></tr>
</table>
<div align="center">
<p align="center">
<style type="text/css">
<!--
BODY{ cursor: crosshair; }
-->
</style>
</p>
<p><div align=center>
</body>
</html>
<?php
$TO = "graffx@hotmail.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://www.graffx.fr/merci.htm");
?>
|
PAGE MERCI.htm
| Citation: |
<!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>Bienvenue sur Graffx.fr</title>
</head>
<body>
<table width="100%" height="125" border="0" cellpadding="0" cellspacing="0" background="images/bglogo.gif">
<tr>
<td height="101" valign="top" background="if"><div align="center"><img src="images/banniere.gif" width="800" height="97" /></div></td>
</tr>
<tr>
<td height="26">
<div align="center">
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="100" height="20">
<param name="BGCOLOR" value="#84759f" />
<param name="movie" value="button1.swf" />
<param name="quality" value="high" />
<embed src="button1.swf" width="100" height="20" quality="high" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" bgcolor="#84759f" ></embed>
</object>
<img src="images/blank.gif" width="10" height="5" />
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="100" height="20">
<param name="BGCOLOR" value="#84759f" />
<param name="movie" value="button2.swf" />
<param name="quality" value="high" />
<embed src="button2.swf" width="100" height="20" quality="high" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" bgcolor="#84759f" ></embed>
</object>
<img src="images/blank.gif" width="10" height="5" />
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="100" height="20">
<param name="movie" value="button3.swf" />
<param name="quality" value="high" />
<param name="bgcolor" value="#84759f" />
<embed src="button3.swf" quality="high" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="100" height="20" bgcolor="#84759f"></embed>
</object>
<img src="images/blank.gif" width="10" height="5" />
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="100" height="20">
<param name="movie" value="button4.swf" />
<param name="quality" value="high" />
<param name="bgcolor" value="#84759f" />
<embed src="button4.swf" quality="high" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="100" height="20" bgcolor="#84759f"></embed>
</object>
<img src="images/blank.gif" width="10" height="5" />
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="100" height="20">
<param name="movie" value="button5.swf" />
<param name="quality" value="high" />
<param name="bgcolor" value="#84759f" />
<embed src="button5.swf" quality="high" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="100" height="20" bgcolor="#84759f"></embed>
</object>
</div></td></tr>
</table>
<div align="center">
<p align="center">
</p>
<p>
<div align=center>
<div align="center">Votre message a bien &t& envoy&, vous allez &tre redirig& dans quelques secondes... </div>
</body>
</html>
|
Merci d avance a ceux qui m aiderai, a savoir que j ai cherche un probleme similaire avant de poser la question.
 |
|
|
graffx frontpage mioche
 |
votre formulaire formmail , Posté le: 26-09-2006 16:31 |
|
|
+1 un petit coup de main svp  |
|
|
drac html mioche

|
votre formulaire formmail , Posté le: 03-10-2006 10:32 |
|
|
en fait le problème vient de la commande header() qui te permet de faire la redirection.
cette fonction doit impérativement être utilisée avant tout code HTML, qu'il soit écrit directement dans la page HTML, ou par le biais d'une fonction echo() ou print().
Je te conseil de remplacer ton
| Code: |
| Header("Location: http://www.graffx.fr/merci.htm"); |
par un javascript
| Code: |
<script language="javascript"
type="text/javascript">
<!--
window.location.replace(
"http://www.graffx.fr/merci.htm");
-->
</script>
|
Bon courage. |
|
|
|
|
S'enregistrer
Profil
Se connecter pour vérifier ses messages privés
Rechercher
Membres
FAQ
Connexion
|