Jump to content


Photo

Lost form data


  • Please log in to reply
1 reply to this topic

#1 TimHorton

TimHorton
  • New Members
  • Pip
  • Newbie
  • 1 posts

Posted 26 August 2004 - 05:50 PM

Am a total idiot/ novice at php. I was tring to get a very basic guestbook for my local NGO/ interest group set up and thought I had it. Everything works except that the form data, the most important part, never comes out in the e-mail at the other end. Can someone help? Thanks.

I have the following form html on a web-page:

<form action="sendmail.php" method="post" enctype="multipart/form-data" name="input">
<h3><font color="#003366" face="Arial, Helvetica, sans-serif">If you have any comments, news or ideas please take the time to fill out this form.</font></h3>
<p><font color="#003366" face="Arial, Helvetica, sans-serif">Name:<br>
<input type="text" name="name"
value="yourname" size="20">
<br>
Mail:<br>
<input type="text" name="mail"
value="yourmail" size="20">
<br>
Comment:<br>
<input type="text" name="comment"
value="yourcomment" size="40">
</font></p>
<p> <font color="#003366" face="Arial, Helvetica, sans-serif"><br>
I am interested in taking out a membership, please send me some more details:
<input type="checkbox" name="InterestedinMembership">
</font> </p>
<p><br>
<input type="submit" value="Submit">
</p>
</form>

The php file is coded thus:

<?
$name = $_REQUEST['name'] ;
$mail = $_REQUEST['mail'] ;
$comment = $_REQUEST['comment'] ;
$InterestedinMembership = $_REQUEST['InterestedinMembership'] ;

mail( "me@myorg.com", "Feedback Form Results",
$message, "From: $mail" );
header( "Location: http://www.myorg.com...m/thankyou.htm" );
?>


Any ideas? Am I missing the obvious?

#2 morpheus.100

morpheus.100
  • Members
  • PipPipPip
  • Advanced Member
  • 145 posts

Posted 28 August 2004 - 03:46 PM

Change $_REQUEST to $_POST




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users