MManning
03-22-2009, 06:31 PM
Hi all,
I'm somewhat new to the world of php and my brother has asked me to help him with his web site. i've been working on a way to send form information by e-mail. Simple enough, but for some reason it just isn't working.
This is the form which I see no problem with.
<FORM action="http://www.dormpaper.com/orderform.php" method="post">
<LABEL for="firstname">First Name: </LABEL><br>
<INPUT type="text" id="firstname"><p>
<LABEL for="lastname">Last Name: </LABEL><br>
<INPUT type="text" id="lastname"><p>
<LABEL for="email">E-mail Address: </LABEL><br>
<INPUT type="text" id="email"><p>
<LABEL for="heightft">Height: </LABEL><br>
<INPUT type="text" id="heightft" size="5"> feet
<LABEL for="heightin"></LABEL>
<INPUT type="text" id="heightin" size="5"> inches <p>
<LABEL for="widthft">Width: </LABEL><br>
<INPUT type="text" id="widthft" size="5"> feet
<LABEL for="widthin"></LABEL>
<INPUT type="text" id="widthin" size="5"> inches <p>
<LABEL for="comments">Comments: </LABEL><br>
<TEXTAREA id="comments" rows="10" cols="50"></TEXTAREA><p>
<LABEL for="image">Upload Image: <LABEL>
<INPUT type="file" id="image"><p>
<INPUT type="submit" value="Submit!">
</FORM>
I can't seem to figure out the problem. I've tried to take the (.) out of the ($_REQUEST['whatever']) and it hasn't worked. I think I also have the attachment wrong, it seems like too little for an attachment.
<?php
$to = "orders@dormpaper.com";
$subject = "New Order";
$body = .$_REQUEST['firstname']."\n";
$body .= .$_REQUEST['lastname']."\n";
$body .= .$_REQUEST['email']."\n";
$body .= .$_REQUEST['heightft']."\n";
$body .= .$_REQUEST['heightin']."\n";
$body .= .$_REQUEST['widthft']."\n";
$body .= .$_REQUEST['widthin']."\n";
$body .= .$_REQUEST['comments'].;
$fileatt = .$_REQUEST['image'].;
mail($to, $subject, $body, $fileatt)
?>
Any help would be greatly appreciated.
I'm somewhat new to the world of php and my brother has asked me to help him with his web site. i've been working on a way to send form information by e-mail. Simple enough, but for some reason it just isn't working.
This is the form which I see no problem with.
<FORM action="http://www.dormpaper.com/orderform.php" method="post">
<LABEL for="firstname">First Name: </LABEL><br>
<INPUT type="text" id="firstname"><p>
<LABEL for="lastname">Last Name: </LABEL><br>
<INPUT type="text" id="lastname"><p>
<LABEL for="email">E-mail Address: </LABEL><br>
<INPUT type="text" id="email"><p>
<LABEL for="heightft">Height: </LABEL><br>
<INPUT type="text" id="heightft" size="5"> feet
<LABEL for="heightin"></LABEL>
<INPUT type="text" id="heightin" size="5"> inches <p>
<LABEL for="widthft">Width: </LABEL><br>
<INPUT type="text" id="widthft" size="5"> feet
<LABEL for="widthin"></LABEL>
<INPUT type="text" id="widthin" size="5"> inches <p>
<LABEL for="comments">Comments: </LABEL><br>
<TEXTAREA id="comments" rows="10" cols="50"></TEXTAREA><p>
<LABEL for="image">Upload Image: <LABEL>
<INPUT type="file" id="image"><p>
<INPUT type="submit" value="Submit!">
</FORM>
I can't seem to figure out the problem. I've tried to take the (.) out of the ($_REQUEST['whatever']) and it hasn't worked. I think I also have the attachment wrong, it seems like too little for an attachment.
<?php
$to = "orders@dormpaper.com";
$subject = "New Order";
$body = .$_REQUEST['firstname']."\n";
$body .= .$_REQUEST['lastname']."\n";
$body .= .$_REQUEST['email']."\n";
$body .= .$_REQUEST['heightft']."\n";
$body .= .$_REQUEST['heightin']."\n";
$body .= .$_REQUEST['widthft']."\n";
$body .= .$_REQUEST['widthin']."\n";
$body .= .$_REQUEST['comments'].;
$fileatt = .$_REQUEST['image'].;
mail($to, $subject, $body, $fileatt)
?>
Any help would be greatly appreciated.