|
Posted by Sander on 10/10/13 11:27
"Ian Davies" <iandan.dav@virgin.net> schreef in bericht
news:hvfZe.16195$st1.1824@newsfe3-gui.ntli.net...
>
> <FORM method=post action="sendmail.php">
> Email: <INPUT name="email" type="text"><br>
> Message:<br>
> <TEXTAREA name="message">
> </textarea><br>
> <input type=submit>
> </FORM>
>
>
> <?php
> mail( "info@mysite.co.uk", "Feedback Form Results",
> $message, "From: $email", "-finfo@mysite.co.uk");
> header("Location: http://www.mysite.co.uk/thankyou.htm");
> ?>
>
> When the submit button is clicked on the form an email is successfully
> sent.
> However, the 'from' box has no text neither does the message section of
> the
> email, despite then being completed on the form. The only things on the
> email are the strings from the script i.e. 'info@mysite.co.uk' in the 'to'
> part of the email and 'Feedback Form Results' in the Title part of the
> email.
> Does anyone know what Im doing wrong
>
> Ian
>
>
Yeah you might want to consider adding this to the top of your script:
$email = $_POST['email'];
$message = $_POST['message'];
For more info on this read: http://nl3.php.net/reserved.variables and
especially the part relating to "HTTP POST variables: $_POST"
Hope it solves your problem,
Sander Swuste
Navigation:
[Reply to this message]
|