You are here: Re: Help please !!! « All PHP « IT news, forums, messages
Re: Help please !!!

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)

 

Navigation:

[Reply to this message]


УдалСнная Ρ€Π°Π±ΠΎΡ‚Π° для программистов  •  Как Π·Π°Ρ€Π°Π±ΠΎΡ‚Π°Ρ‚ΡŒ Π½Π° Google AdSense  •  England, UK  •  ΡΡ‚Π°Ρ‚ΡŒΠΈ Π½Π° английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Π‘Π°ΠΉΡ‚ ΠΈΠ·Π³ΠΎΡ‚ΠΎΠ²Π»Π΅Π½ Π² Π‘Ρ‚ΡƒΠ΄ΠΈΠΈ Π’Π°Π»Π΅Π½Ρ‚ΠΈΠ½Π° ΠŸΠ΅Ρ‚Ρ€ΡƒΡ‡Π΅ΠΊΠ°
ΠΈΠ·Π³ΠΎΡ‚ΠΎΠ²Π»Π΅Π½ΠΈΠ΅ ΠΈ ΠΏΠΎΠ΄Π΄Π΅Ρ€ΠΆΠΊΠ° Π²Π΅Π±-сайтов, Ρ€Π°Π·Ρ€Π°Π±ΠΎΡ‚ΠΊΠ° ΠΏΡ€ΠΎΠ³Ρ€Π°ΠΌΠΌΠ½ΠΎΠ³ΠΎ обСспСчСния, поисковая оптимизация