Re: Feedback form not sending values




"Ian Davies" <iandan.dav@xxxxxxxxxx> schreef in bericht
news:hvfZe.16195$st1.1824@xxxxxxxxxxxxxxxxxxxxxxx

>
> <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@xxxxxxxxxxxx", "Feedback Form Results",
> $message, "From: $email", "-finfo@xxxxxxxxxxxx");
> 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@xxxxxxxxxxxx' 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


.