Help!

Androo

Yeah, Androo.
hey, i wanna have a php form done by next week which sends the information by email.... here's the php part:


<?
$realname = $_GET['name'];
$email = $_GET['email'];
$feedback = $_GET['feedback'];

if ($realname == '' | $email == '' | $feedback == ''){
?>

<h1 align="center">ERROR</h1>
<p align="center">All fields must be filled in!</p>
</div>
<?

}else{

$sendto = "androo@penguinn.com";
$subject = "SUBJECT";
$message = "$realname, $email, $feedback";

mail($sendto, $subject, $message);

if($submitted = "yes"){
print "Mail sent!";
}
}
?>


And then i have this form to go with it:

<form name="email form" method="get" action="email2.php">
<table width="400" height="200" border="1">
<tr>
<td>Name:</td>
<td><input type="text" name="name"></td>
</tr>
<tr>
<td>E-mail address:</td>
<td><input type="text" name="email"></td>
</tr>
<tr>
<td>Comments</td>
<td><textarea name="feedback"></textarea></td>
</tr>
<tr>
<td colspan="2"><div align="center">
<input name="submitted" type="hidden" id="submitted" value="yes">
<input type="submit" name="Submit" value="Send">
</div></td>
</tr>
</table>
</form>


But it doesnt send any email.... anyone kno what's wrooong?
thanks,
Androo.
 
Also double = sign in
if($submitted = "yes") cause you're doing a comparison, not an assignment.

If sendmail isn't started, your email won't be sent either, so make sure sendmail is working if you're testing on your local machine.
 
my friend told me while i was making it actually.... and i forgot to add it in lol....
SO WHO'S THE LIAR NOW? no one...
ummm cya.
 
Back
Top