Re: Mail form
| From: | Marek Kilimajer | Date: | Fri, 25 Oct 2002 12:15:52 +0000 |
| Subject: | Re: Mail form | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-121418@lists.php.net to get a copy of this message | ||
Register globals problem - either use $_POST['numele'] (prefered), or turn register_globals on.
Trasca Ion-Catalin wrote:
Why my mail prcessing script don't recognize the value from the form file. If I call the $numele variable it's just output a null. This is the form.html <html> <head> <title>Numele</title> <body> <form name="form" method=post action="mail.php"> <p align="center">Nume: <input name="numele" type="text" value="Cum vrei tu"> </p> <div align="center"> <input type="submit" name="Submit" value="Trimite"> </div> </form> </body> </html> And this is mail.php <html></head><title>Mesajul este trimis</title> <?php $email = "Nume:\t$numele"; $to = "tic2000@home.ro"; $subject = "Nume"; # mail($to, $subject, $email); ?> </head> <body><div align="justify"> <? echo ("Ai trimis numele $numele"); ?> </div> </body> </html> the mail command is commentet for testing purpose, I don't want to receive a e-mail every time I test the script. -- Trasca Ion-Catalin