Jump to content

PHP MAIL problems, wont recieve email


Vivid Lust
 Share

Recommended Posts

Here are the codes that i wrote:

 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Web Design Survey</title>
<style>
body{
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 11px;
text-align: center;
background: #b5d6ff;
}
#diva{
background: #fff;
margin: auto;
text-align: left;
width: 580px;

}

#div{
background: #fff;
margin: auto;
text-align: left;
width: 550px;

}
</style>
</style>
</head>
<body>
<div id="diva">
<div id="div">
<br><br><p><b><center>If you are not here to seriously and truthuly answer this survey then please fuck off; this will not be tolerated. This survey is for the market research of a web design company.</center> </b></p><br><br>
<form id="form1" name="form1" method="post" action="surveyx.php">
<label>Name:<br />
<input type="text" name="name" id="name" /><br />
</label>
<label>Age:<br />
<input type="text" name="age" id="age" /><br />
</label>
<label>Email:<br />
<input type="text" name="email" id="email" />
<br />
<br />
How much would you spend for a custom website that has a contnent management system?<br />
<input type="text" name="much" id="much" />
<br />
<br />
What time scale would you want your website to be made in?<br />
<input type="text" name="time" id="time" />
<br />
<br />
What way would you prefer to pay for your site?<br />
<select name="pay" id="pay">
<option value="Credit Card">Credit Card</option>
<option value="Paypal">Paypal</option>
<option value="Invoice">Invoice</option>
<option value="Other">Other</option>
</select>
<br />
<br />
What type of site would appeal to you most to hire a web designer from?<br />
<textarea name="appeal" id="appeal" cols="45" rows="5"></textarea>
<br />
<br />
What type of service would you expect from a web design company?<br />
<textarea name="service" id="service" cols="45" rows="5"></textarea>
<br />
<br />
What features would you expect your site to have when made? <br />
<textarea name="features" id="features" cols="45" rows="5"></textarea>
<br />
<br />
Please add any other comments you have to do with hiring a web designer<br />
<textarea name="other" id="other" cols="45" rows="5"></textarea>
<br />
<br />
<center><input type="submit" name="submit" id="submit" value="Submit" /></center>
<br />
<br />
</label>
</form>
</div>
</div>
</body>
</html>

 

<?php
$name = $_POST['name'];
$age = $_POST['age'];
$email = $_POST['email'];

$much = $_POST['much'];
$time = $_POST['time'];
$pay = $_POST['pay'];

$appeal = $_POST['appeal'];
$service = $_POST['service'];
$features = $_POST['features'];
$other = $_POST['other'];

$msg1 = "Survey sent from $name , aged $age at $email <br>";
$msg = "$name would spend $much on hiring a web designer. The time frame expected would be $time . The payment method would be: $pay <br> ";
$msg3 = "The following site would appeal to $name<br><br> $appeal<br><Br> The service expected would be: <br><br> $service<br><br> The features expected are: <br><br> $features <br><br> Other Comments: <Br><br> $other <br><br><br>END OF MESSAGE";

$message = $msg1.$msg.$msg3;
$to = "stainerjacob@yahoo.co.uk";
$subject = "Survey has been done";
$from = "stainerjacob@yahoo.co.uk";

mail("stainerjacob@yahoo.co.uk, $subject, $message, $from);
?>

<head>
<title>Web Design Survey</title>
<style>
body{
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 11px;
text-align: center;
background: #b5d6ff;
}
#diva{
background: #fff;
margin: auto;
text-align: left;
width: 580px;

}

#div{
background: #fff;
margin: auto;
text-align: left;
width: 550px;

}
</style>
</style>
</head>
<body>
<div id="diva">
<div id="div"><br><br>
<center>Thank you <?php echo( $name ); ?>, your submission was successful!</center>
<br><br></div>
</body>

 

The problem is, is that i do not recieve the email. Please help! Help would be much apreciated!!

 

Thanks again.

Vivid

Link to comment
Share on other sites

change this:

mail("stainerjacob@yahoo.co.uk, $subject, $message, $from);

 

to this:

mail("stainerjacob@yahoo.co.uk", $subject, $message, $from);

or

mail($to, $subject, $message, $from);

 

Turn on error reporting and display errors so you see PHP syntax issues.

Link to comment
Share on other sites

This thread is more than a year old. Are you sure you have something important to add to it?

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.

 Share

×
×
  • 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.