Click to See Complete Forum and Search --> : [RESOLVED] Emailing a form help


mrtom100
06-26-2007, 06:47 PM
hello i am having trouble e-mailing a php form that contain quite a bit of information. I can not get it to send all the fields of the form only one anyone have any ideas ?

This is the code i use to mail the form to my account:


<?
// send the form by e-mail
$to = "mail@something.com";
$from = $_REQUEST['email'];
$subject = $_REQUEST['Register Form'];
$name = $_REQUEST['Name'] ;
$subject = " Re";


$headers = "";


$headers="MIME-Version: 1.0\nContent-type: text/html; charset=iso-8859-1\n";

$headers.="From: $from\nReply-To: $from\n";
// -f added to the from variable to allow it to work due to restrictions on the server
mail ($to,$subject,$message,$headers,"-f$from");
// after processed go here thank.php
header ("Location: thanks.html");
?>

This is a link to the form which i need the information to be sent from

http://mi-linux.wlv.ac.uk/~0602840/main.php

any help would be great

aaronuni
06-27-2007, 01:08 AM
What information is not getting sent by the mail function? From what I see from your code, message is not defined and subject is assigned a value twice instead of using string concatenation. But I'm not sure exactly what your problem is.

mrtom100
06-27-2007, 10:32 AM
Basically this is a link to a form http://mi-linux.wlv.ac.uk/~0602840/main.php Basically i want to e-mail the information entered onto the form. But if i put more than one variable to e-mail it says they are not an array followed by other errors

JDM71488
06-27-2007, 12:24 PM
You might want to loop through the $_POST array and build a string with the values and assign this to $message. A more detailed error message might help.