Jump to content

Recommended Posts

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/thankyou.htm" );

?>

 

 

Any ideas? Am I missing the obvious?

Link to comment
https://forums.phpfreaks.com/topic/1937-lost-form-data/
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.