euphoriastudio
10-10-2008, 03:12 AM
So I'm having an issue and was curious if I need to rewrite the rest of my site in php, get a different host, or change my coding. My site is written in HTML as is the form, but the way the form is processed is through a PHP page. Any ideas as to why the code will not send the form to my email?
I use freehostia.com currently so I'm not sure if that may be the problem.
This is the link to my site if it will help http://euphoriastudio.freehostia.com
html page the form appears on:
<html>
<head>
<title>Quote</title>
</head>
<body>
<form method="post" action="sendmail.php">
Name:<br><input type="text" size="50" maxlength="120" name="name"><p>
Phone:<br><input type="text" size="50" maxlength="120" name="phone"><p>
Email:<br><input type="text" size="50" maxlength="120" name="email"><p>
What you need:<br>
<input type="checkbox" name="need" value="Website">Website
<br>
<input type="checkbox" name="need" value="Redesign">Re-Design
<br>
<input type="checkbox" name="need" value="Template">Template Modification
<br>
<input type="checkbox" name="need" value="Graphics">Graphic Design
<br>
<input type="checkbox" name="need" value="LogoBrand">Logo/Brand Creation
<br>
<input type="checkbox" name="need" value="Ad">Advertising Ad
<br>
<input type="checkbox" name="need" value="Banner">Banner Ad<p>
Project Description:<br><textarea rows="5" cols="40" name="descrip">
Try to be as descriptive as possible. Include deadlines, features, and a budget range. Also include times you are available to receive calls.
</textarea><p>
<input type="submit" value="submit" name="submit"><br />
</form><br />
</body>
</html>
this is the page the form is processed through:
<?php
$required = array('phone', 'email', 'name');
foreach($required as $v){
if(empty($_POST[$v])){
echo 'sorry, '.htmlspecialchars($v).' needs to be filled in';
die();
}
}
$name = $_REQUEST["name"];
$phone = $_REQUEST["phone"];
$email = $_REQUEST["email"];
$need = $_REQUEST["need"];
$descrip = $_REQUEST["descrip"];
$embody = "Name: $name\n Phone: $phone\n Email: $email\n Project: $need\n Description: $descrip\n";
mail("euphoria.studio@gmail.com", "New Client Request", $embody, "From: $name <$email>" )
or die("Can't send email");
header( "Location: http://euphoriastudio.freehostia.com/index.html" );
?>
Any help is greatly appreciated. I'm a total novice when it comes to PHP so bear with me if I'm having trouble.
I use freehostia.com currently so I'm not sure if that may be the problem.
This is the link to my site if it will help http://euphoriastudio.freehostia.com
html page the form appears on:
<html>
<head>
<title>Quote</title>
</head>
<body>
<form method="post" action="sendmail.php">
Name:<br><input type="text" size="50" maxlength="120" name="name"><p>
Phone:<br><input type="text" size="50" maxlength="120" name="phone"><p>
Email:<br><input type="text" size="50" maxlength="120" name="email"><p>
What you need:<br>
<input type="checkbox" name="need" value="Website">Website
<br>
<input type="checkbox" name="need" value="Redesign">Re-Design
<br>
<input type="checkbox" name="need" value="Template">Template Modification
<br>
<input type="checkbox" name="need" value="Graphics">Graphic Design
<br>
<input type="checkbox" name="need" value="LogoBrand">Logo/Brand Creation
<br>
<input type="checkbox" name="need" value="Ad">Advertising Ad
<br>
<input type="checkbox" name="need" value="Banner">Banner Ad<p>
Project Description:<br><textarea rows="5" cols="40" name="descrip">
Try to be as descriptive as possible. Include deadlines, features, and a budget range. Also include times you are available to receive calls.
</textarea><p>
<input type="submit" value="submit" name="submit"><br />
</form><br />
</body>
</html>
this is the page the form is processed through:
<?php
$required = array('phone', 'email', 'name');
foreach($required as $v){
if(empty($_POST[$v])){
echo 'sorry, '.htmlspecialchars($v).' needs to be filled in';
die();
}
}
$name = $_REQUEST["name"];
$phone = $_REQUEST["phone"];
$email = $_REQUEST["email"];
$need = $_REQUEST["need"];
$descrip = $_REQUEST["descrip"];
$embody = "Name: $name\n Phone: $phone\n Email: $email\n Project: $need\n Description: $descrip\n";
mail("euphoria.studio@gmail.com", "New Client Request", $embody, "From: $name <$email>" )
or die("Can't send email");
header( "Location: http://euphoriastudio.freehostia.com/index.html" );
?>
Any help is greatly appreciated. I'm a total novice when it comes to PHP so bear with me if I'm having trouble.