View Full Version : using PHp coding but not working


Darkangel090260
07-20-2006, 05:43 PM
html>
<head>
<title> My Test Form </title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"></head>
<body bgcolor="#000000">
<div align="center"><font color="#FF0000" size="6">RSVP</font><br />
</div>
<form action="process.php" method="post">
<div align="center">
<p align="left"><font color="#FF0000">Guest Name:</font>:
<input type="text" name="subject">
</p>
<p align="left"><font color="#FF0000">
<input type="radio" name="your question1"value="Accept">
Accept with pleasure<BR>
<input type="radio" name="your question1"value="Deline">
Decline wth regret</font></p>
<p align="left"><font color="#FF0000">Please indicate dinner preferenc</font>e
goes here:<br>
<font color="#FF0000">
<input type="radio" name="Spaghetti Meatballs"value="Yes">
Spaghetti Meatballs</font><BR>
<input type="radio" name="Fettuccine with Asparagus and Chicken"value="yes">
<font color="#FF0000">Fettuccine with Asparagus and Chicken</font><BR>
<input type="radio" name="Fettuccine with Asparagus"value="yes">
<font color="#FF0000">Fettuccine with Asparagus </font> <BR>
<input type="radio" name="Veggy spaghettie with mushroom"value="yes">
<font color="#FF0000">Veggy spaghettie with mushroom</font> </p>
<p align="left"><font color="#FF0000">Number Attending:</font>
<input type="text" name="question:" size="10" maxlength="100">
<br>
<br />
<font color="#FF0000">Guest email :</font>
<input type="text" name="from">
</p>
<p align="left"><font color="#FF0000">Comments/ Special Needs/ Number of each
meal</font> e<br />
<textarea name="message" rows="3" cols="40"></textarea>
<br />
<input type="submit" value="Send the info">
<input type="reset" value="Clear the form">
</p>
</div>
</form>
</body>
</html> <?php
$to ="Darkangel090260@yahoo.com";

$headers = "From:Drakangel090260@yahoo.com\r\n";
$headers .= "Reply-To:Drakangel090260@yahoo.com\r\n";
$headers .= "Return-Path:Drakangel090260@yahoo.com\r\n";
$message = "<html><body>";
$message .= "<h1> This is a test </h1>";
$message .= "</body></html>";
if ( mail($to,$subject,$message,$headers) ) {
echo "The email has been sent!";
} else {
echo "The email has failed!";
}
?>


so what am i doing wrong!!!!

Douglas
07-21-2006, 01:48 AM
First of all, does your host support PHP? Second of all, what is the exact problem? Last of all, is the extension on the file .php/.php3/.php4/.php5/.phtml ?

Darkangel090260
07-21-2006, 07:18 AM
ya i have them all list as .php its not sending the email. yes my host support php

Douglas
07-21-2006, 02:40 PM
There are problems with free email hosts such as yahoo, gmail, hotmail, etc and sending email through PHP, it either arrives or doesn't sorry, that is the only reason I can think of.

eedesigns
07-22-2006, 02:15 AM
Do you have your own domain?? if so then you could create an email with you domain name.....

eedesigns
07-22-2006, 02:15 AM
Do you have your own domain?? if so then you could create an email with you domain name.....

Wermaus
07-22-2006, 03:18 AM
Do you get "The email has been sent!" )and it doesn't arrive( or "The email has failed!" or neighter when running the script?