Hello,
I tested a PHP script with a FORM of 2 element and it delivered the
mail but then when I added more FORM elements, it failed to deliver.
Following is the content of the PHP script that I'm talking about, it
is my first PHP script. Please advise what's wrong. The mail server,
kind of unlikely, the first try it sent the mail (beginner's luck?),
all of sudden, it went down? it's not on my box.
Thanks.
<?php
$to_addr = 'donli@yahoo.co m';
if (isset($_REQUES T['submit'])) {
$mail_body .= "WHYSELLING : ".$_REQUEST['WHYSELLING'];
$mail_body .= "\nHOUSEADDRESS : ".$_REQUEST['HOUSEADDRESS'];
$mail_body .= "\nLOANOUTSTAND ING: ".$_REQUEST['LOANOUTSTANDIN G'];
mail($to_addr,' Form One');
print "Thank you for your submission.";
} else {
print<<<_HTML_
<form method="POST" action="$_SERVE R[PHP_SELF]">
<table width="65%" border="4" cellpadding="2" cellspacing="0"
bgcolor="" align="center">
<tr><td>
<table border="0" cellspacing="0" cellpadding="0" bgcolor="">
<tr>
<td>Address of house you are selling:</td>
<td><font size="2" face="Arial">
<input name="HouseAddr ess" type="text" id="HouseAddres s"
size="35">
</font></td>
</tr>
<tr>
<td>Why are you selling?</td>
<td><textarea name="WhySellin g" cols="26" rows="3"
id="WhySelling" ></textarea></td>
</tr>
<tr>
<td>Are there outstanding loans?</td>
<td><font size="2" face="Arial">
<input type="radio" value="Yes" name="LoanOutst anding">
Yes
<input type="radio" name="LoanOutst anding" value="No">
No</font></td>
</tr>
<p align="center">
<input TYPE="submit" NAME="submit" VALUE="Send Form">
</td>
</tr>
</table>
</td></tr>
</table>
</form>
_HTML_;
}
?>
I tested a PHP script with a FORM of 2 element and it delivered the
mail but then when I added more FORM elements, it failed to deliver.
Following is the content of the PHP script that I'm talking about, it
is my first PHP script. Please advise what's wrong. The mail server,
kind of unlikely, the first try it sent the mail (beginner's luck?),
all of sudden, it went down? it's not on my box.
Thanks.
<?php
$to_addr = 'donli@yahoo.co m';
if (isset($_REQUES T['submit'])) {
$mail_body .= "WHYSELLING : ".$_REQUEST['WHYSELLING'];
$mail_body .= "\nHOUSEADDRESS : ".$_REQUEST['HOUSEADDRESS'];
$mail_body .= "\nLOANOUTSTAND ING: ".$_REQUEST['LOANOUTSTANDIN G'];
mail($to_addr,' Form One');
print "Thank you for your submission.";
} else {
print<<<_HTML_
<form method="POST" action="$_SERVE R[PHP_SELF]">
<table width="65%" border="4" cellpadding="2" cellspacing="0"
bgcolor="" align="center">
<tr><td>
<table border="0" cellspacing="0" cellpadding="0" bgcolor="">
<tr>
<td>Address of house you are selling:</td>
<td><font size="2" face="Arial">
<input name="HouseAddr ess" type="text" id="HouseAddres s"
size="35">
</font></td>
</tr>
<tr>
<td>Why are you selling?</td>
<td><textarea name="WhySellin g" cols="26" rows="3"
id="WhySelling" ></textarea></td>
</tr>
<tr>
<td>Are there outstanding loans?</td>
<td><font size="2" face="Arial">
<input type="radio" value="Yes" name="LoanOutst anding">
Yes
<input type="radio" name="LoanOutst anding" value="No">
No</font></td>
</tr>
<p align="center">
<input TYPE="submit" NAME="submit" VALUE="Send Form">
</td>
</tr>
</table>
</td></tr>
</table>
</form>
_HTML_;
}
?>
Comment