soulflycrx
12-09-2003, 02:05 PM
Ok. I am new to php. I have set up an email form for a website that I am building for my mom as a favor to her. I have got the email form to send me an email, and all is fine in that department. What I need now is some sort of screen to give the user confirmation that the email was sent, and then perhaps bring the user back to the contact page.
here is the page that I am working on: http://www.wildernesscrossing.com/contact.php
Here is the code...
Does anybody have a good solution for me? THANKS! :p
<?php
// if submitted form process and send mail
if ($REQUEST_METHOD == "POST") {
// just to be on the safe side
// I'll strip out HTML tags
// (scripting code may mess with some email clients)
$realname = strip_tags($realname);
$email = strip_tags($email);
$feedback = strip_tags($feedback);
$sendto = "ryans@accesscomm.ca";
$subject = "Question or comment from Wilderness Crossing.";
$message = "$realname, $email\n\n$feedback";
mail($sendto, $subject, $message);
}
?>
<html>
<head>
<title>Wilderness Crossing - Wildlife & Gift Gallery: Contact Us</title>
<script language="JavaScript">
<!--
function MM_reloadPage(init) { //reloads the window if Nav4 resized
if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
// -->
</script>
</head>
<body background="images/bg2.gif" GPROPERTIES="FIXED" bgcolor="#CCCC99" text="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" link="#006699" vlink="#006699" alink="#006699">
<table width="750" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><img src="images/header.gif" width="640" height="102"></td>
</tr>
<tr>
<td height="133" valign="top">
<table width="205" border="0" cellspacing="0" cellpadding="0" height="158">
<tr>
<td width="19" height="17"> </td>
<td width="188" height="17"> </td>
</tr>
<tr>
<td width="19" height="5"> </td>
<td width="188" height="5" valign="top">
<div align="left"> <font face="Georgia, Times New Roman, Times, serif" size="3"><b><i>Contact
Us:</i></b></font></div>
</td>
</tr>
<tr>
<td width="19" height="11"> </td>
<td width="188" height="11"><font face="Arial, Helvetica, sans-serif" size="3"></font></td>
</tr>
<tr>
<td width="19" height="2"> </td>
<td width="188" height="2"><font face="Arial, Helvetica, sans-serif" size="3"></font></td>
</tr>
<tr>
<td width="19" height="11"> </td>
<td width="188" height="11"> </td>
</tr>
<tr>
<td width="19" height="2"> </td>
<td width="188" height="2"><font face="Arial, Helvetica, sans-serif" size="3"></font></td>
</tr>
<tr>
<td width="19" height="2"> </td>
<td width="188" height="2"> </td>
</tr>
<tr>
<td width="19" height="11"> </td>
<td width="188" height="11"> </td>
</tr>
<tr>
<td width="19" height="2"> </td>
<td width="188" height="2"><font face="Georgia, Times New Roman, Times, serif" size="3"><b><a href="index.html"><font color="#FFFFFF">Back
to Home</font></a></b></font></td>
</tr>
</table>
<div id="Layer1" style="position:absolute; width:517px; height:120; z-index:1; left: 219px; top: 108px">
<div align="center">
<table width="517" border="1" height="59" cellpadding="7" cellspacing="0" bgcolor="#999966">
<tr>
<td height="121" valign="top">
<div align="center"><b><font face="Georgia, Times New Roman, Times, serif" color="#993300" size="4">~
Contact Us ~</font></b></div>
<p><font face="Georgia, Times New Roman, Times, serif" size="3"><b>E-mail:</b><br>
For questions, and all other inquiries, please use the e-mail
form below. We will be sure to reply asap.</font></p>
<!-- *** START HTML FORM -->
<form action="<? echo("$script_name"); ?>" METHOD="POST">
<table cellpadding=4 cellspacing=0 border=0>
<tr><td><b>Name: </b></td><td><input type="text" name="realname" size=25></td></tr>
<tr><td><b>Email:</b></td><td><input type="text" name="email" size=25></td></tr>
<tr>
<td colspan=2><b>Questions / comments:</b><br>
<textarea name="feedback" rows=4 cols=40 wrap=physical></textarea>
</td></tr>
<tr>
<td colspan=2 align=left height="16">
<input type="submit" value="Send Feedback"></td></tr>
</table>
</form>
<!-- *** END HTML FORM -->
<p><font size="3"><b><font face="Georgia, Times New Roman, Times, serif">Fax:</font></b><font face="Georgia, Times New Roman, Times, serif">
(306) 781-2513</font></font>
<p><font size="3" face="Georgia, Times New Roman, Times, serif"><b>Phone:
</b>1-877-781-2498 (toll free)</font></p>
</td>
</tr>
</table>
</div>
</div>
</td>
</tr>
</table>
</body>
</html>
here is the page that I am working on: http://www.wildernesscrossing.com/contact.php
Here is the code...
Does anybody have a good solution for me? THANKS! :p
<?php
// if submitted form process and send mail
if ($REQUEST_METHOD == "POST") {
// just to be on the safe side
// I'll strip out HTML tags
// (scripting code may mess with some email clients)
$realname = strip_tags($realname);
$email = strip_tags($email);
$feedback = strip_tags($feedback);
$sendto = "ryans@accesscomm.ca";
$subject = "Question or comment from Wilderness Crossing.";
$message = "$realname, $email\n\n$feedback";
mail($sendto, $subject, $message);
}
?>
<html>
<head>
<title>Wilderness Crossing - Wildlife & Gift Gallery: Contact Us</title>
<script language="JavaScript">
<!--
function MM_reloadPage(init) { //reloads the window if Nav4 resized
if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
// -->
</script>
</head>
<body background="images/bg2.gif" GPROPERTIES="FIXED" bgcolor="#CCCC99" text="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" link="#006699" vlink="#006699" alink="#006699">
<table width="750" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><img src="images/header.gif" width="640" height="102"></td>
</tr>
<tr>
<td height="133" valign="top">
<table width="205" border="0" cellspacing="0" cellpadding="0" height="158">
<tr>
<td width="19" height="17"> </td>
<td width="188" height="17"> </td>
</tr>
<tr>
<td width="19" height="5"> </td>
<td width="188" height="5" valign="top">
<div align="left"> <font face="Georgia, Times New Roman, Times, serif" size="3"><b><i>Contact
Us:</i></b></font></div>
</td>
</tr>
<tr>
<td width="19" height="11"> </td>
<td width="188" height="11"><font face="Arial, Helvetica, sans-serif" size="3"></font></td>
</tr>
<tr>
<td width="19" height="2"> </td>
<td width="188" height="2"><font face="Arial, Helvetica, sans-serif" size="3"></font></td>
</tr>
<tr>
<td width="19" height="11"> </td>
<td width="188" height="11"> </td>
</tr>
<tr>
<td width="19" height="2"> </td>
<td width="188" height="2"><font face="Arial, Helvetica, sans-serif" size="3"></font></td>
</tr>
<tr>
<td width="19" height="2"> </td>
<td width="188" height="2"> </td>
</tr>
<tr>
<td width="19" height="11"> </td>
<td width="188" height="11"> </td>
</tr>
<tr>
<td width="19" height="2"> </td>
<td width="188" height="2"><font face="Georgia, Times New Roman, Times, serif" size="3"><b><a href="index.html"><font color="#FFFFFF">Back
to Home</font></a></b></font></td>
</tr>
</table>
<div id="Layer1" style="position:absolute; width:517px; height:120; z-index:1; left: 219px; top: 108px">
<div align="center">
<table width="517" border="1" height="59" cellpadding="7" cellspacing="0" bgcolor="#999966">
<tr>
<td height="121" valign="top">
<div align="center"><b><font face="Georgia, Times New Roman, Times, serif" color="#993300" size="4">~
Contact Us ~</font></b></div>
<p><font face="Georgia, Times New Roman, Times, serif" size="3"><b>E-mail:</b><br>
For questions, and all other inquiries, please use the e-mail
form below. We will be sure to reply asap.</font></p>
<!-- *** START HTML FORM -->
<form action="<? echo("$script_name"); ?>" METHOD="POST">
<table cellpadding=4 cellspacing=0 border=0>
<tr><td><b>Name: </b></td><td><input type="text" name="realname" size=25></td></tr>
<tr><td><b>Email:</b></td><td><input type="text" name="email" size=25></td></tr>
<tr>
<td colspan=2><b>Questions / comments:</b><br>
<textarea name="feedback" rows=4 cols=40 wrap=physical></textarea>
</td></tr>
<tr>
<td colspan=2 align=left height="16">
<input type="submit" value="Send Feedback"></td></tr>
</table>
</form>
<!-- *** END HTML FORM -->
<p><font size="3"><b><font face="Georgia, Times New Roman, Times, serif">Fax:</font></b><font face="Georgia, Times New Roman, Times, serif">
(306) 781-2513</font></font>
<p><font size="3" face="Georgia, Times New Roman, Times, serif"><b>Phone:
</b>1-877-781-2498 (toll free)</font></p>
</td>
</tr>
</table>
</div>
</div>
</td>
</tr>
</table>
</body>
</html>