|
Posted by Kim Andrι Akerψ on 04/05/06 14:23
Roger Dodger wrote:
>
> shmol wrote:
> > Hi,
> >
> > Help please !
> >
> > My html page:
> >
> > <body>
> > <form id="form1" name="form1" method="post"
> > action="inscription.php"> <label>nom
> > <input name="nom" type="text" id="nom" />
> > </label>
> > <br />
> > <input name="prenom" type="text" id="prenom" />
> > <br />
> > <input name="mail" type="text" id="mail" />
> > <br />
> > <input type="submit" name="Submit" value="Envoyer" />
> > </form>
> >
> > The inscription .php file:
> >
> > <?
> > $text="Nom: ".$nom.chr(10).chr(13)."Prenom:
> > ".$prenom.chr(10).chr(13)."Mail: ".$mail.chr(10).chr(13);
> > mail("inscription@20h00.info", "Inscription",$text);
> > header("Location:merci.htm");
> > ?>
> >
> > I receive the mail but no data !!!!!!
> > WHY?
>
> Try:
>
> $text = "Nom: " . $_POST['nom'] . chr(10) . chr(13);
> $text .= "Prenom: " . $_POST['prenom'] . chr(10) . chr(13);
> $text .= "Mail:" . $_POST['mail'] . chr(10) . chr(13);
The chr(10).chr(13) should be the other way around, too (after all, the
correct order on a Windows system is CR/LF, not LF/CR).
Also, it's much easier to write "\r\n" instead of chr(13).chr(10).
--
Kim AndrΓ© AkerΓΈ
- kimandre@NOSPAMbetadome.com
(remove NOSPAM to contact me directly)
[Back to original message]
|