php code error
Posted: Fri Sep 02, 2005 10:41 am
Hey guys im new to the forums..hoping maybe you can help me though..I developed a flash basec contest form. you can see it at http://www.zeroxposur.com/test then click on contest.. Anyways after you fillit out it sends me the email..however the only info that comes though is " From Undefined" heres my php code..did I do something wrong?
feyd | Please use
Code: Select all
<?php
$name = $_POST["name"];
$email = $_POST["email"];
$address = $_POST["address"];
$state = $_POST["state"];
$zipcode = $_POST["zipcode"];
$sex = $_POST["sex"];
$city = $_POST["city"];
$about = $_POST["about"];
$color = $_POST["color"];
$athlete = $_POST["athlete"];
$game = $_POST["game"];
$music = $_POST["music"];
$create = $_POST["create"];
$to = "webmaster@zeroxposur.com";
$subject = "Contest Form Info";
$body = "{$name} email is {$email} their address is {$address} and the state they reside in is {$state} who's zipcode is {$zipcode} {$name} is a {$sex} who wrote this as a description of themselves{$about} Their favorite athlete is {$athlete} their favorite game is {$game} Their favorite music is {$music} and if they could create a jacket they would do the following {$create}";
$result = @mail($to, $subject, "From: {$email}\r\n");
if($result) {
echo "result=email sent";
} else {
echo "result=email failed to send";
}
?>feyd | Please use
Code: Select all
andCode: Select all
tags where approriate when posting code. Read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url][/color]