I'm not sure if this is possible even. I'm wanting to set up a page so that people can e-mail things (text only) to me with out it using the comps e-mail program.
I myself do not use out look express or programs like that so I can not use forms that use those to send the forms to the page owner and would like make a form that anyone can use.
So does anyone know if this is possible?
Eeyore
"Doing the impossible is simplly a matter of doing what others say can't be done." Dale Burden
Yes, it is possible, assumbing that your server has a mail server. Here is the script that I use to do this.
PHP Code:
<?PHP
#######################################################
# This script is Copyright 2003, Infinity Web Design #
# Written by Ryan Brill - [email]ryan@infinitypages.com[/email] #
# All Rights Reserved - Do not remove this notice #
#######################################################
## The lines below need to be edited...
###################### Set up the following variables ######################
# #
$to = "you@your.com"; #set address to send form to
$subject = "Results from your Request Info form"; #set the subject line
$headers = "From: Form Mailer"; #set the from address
$forward = 1; # redirect? 1 : yes || 0 : no
$location = "thankyou.htm"; #set page to redirect to, if 1 is above
# #
##################### No need to edit below this line ######################
## set up the time ##
$date = date ("l, F jS, Y");
$time = date ("h:i A");
## mail the message ##
$msg = "Below is the result of your feedback form. It was submitted on $date at $time.\n\n";
mail($to, $subject, $msg, $headers);
if ($forward == 1) {
header ("Location:$location");
}
else {
echo ("Thank you for submitting our form. We will get back to you as soon as possible.");
}
<!-- Begin Blue Wave Data Mail Form Header -->
<html>
<head>
<title>Contact Us</title>
</head>
<body vlink="#0000FF" alink="#0000FF">
<div align="center">
<center>
<table border="0" cellpadding="0" cellspacing="0" width="700">
<tr>
<td valign="top" align="left" width="700"><font size="5">C</font><font size="4">ONTACT</font><font size="5">
U</font><font size="4">S</font></td>
</tr>
<tr>
<td valign="top" align="left" width="700">F<font size="2">ILL</font> <font size="2">IN THE FORM BELOW AND CLICK</font> <font size="2"><b>"SUBMIT"</b></font></td>
</tr>
<tr>
<td valign="top" align="left" width="700" height="20"></td>
</tr>
</table>
</center>
</div>
<div align="center">
<center>
<table border="0" cellpadding="0" cellspacing="0" width="700">
<tr>
<td valign="top" align="left" width="50"></td>
<td valign="top" align="left" width="650">
<!-- END Blue Wave Data Mail Form HEADER -->
<FORM ACTION="feedback.php" METHOD="POST">
<input type="hidden" name="REMOTE_ADDR" value="<? echo $REMOTE_ADDR;?>">
<table border=0 width="400">
<tr>
<td><b><font face="Arial">Name:</font></b></td><td><input name="uname" type="text" rows=1 value="<?php echo $uname;?>" size="37"></td>
</tr>
<tr>
<td><b><font face="Arial">Email:</font></b></td><td><input type=text name="uemail" rows=1 value="<?php echo $uemail;?>" size="37"></td>
</tr>
<tr>
<td><font face="Arial">Telephone:</font></td><td><input type=text name="uphone" rows=1 value="<?php echo $uphone;?>" size="37"></td>
</tr>
<tr>
<td><font face="Arial">Subject:</font></td><td><select name="usubj" value="<?php echo $usubj;?>" size="1">
<OPTION>Suggestion
<OPTION>Comment
<OPTION>Question
</SELECT>
</td>
</tr>
<tr>
<td></td>
<td></td>
</tr>
</table>
<br>
<font face="Arial" size="4">Enter Your Questions or Comments Below:</font>
<table border=0>
<tr>
<td><textarea name="umsg" rows=7 cols=50 value="<?php echo $umsg;?>" size="800"></textarea></td>
</tr>
</table>
<p><input type="submit" value="Submit" name="Send"></p>
</form>
<!-- BEGIN Blue Wave Data Mail Form FOOTER -->
</td>
</tr>
<tr>
<td valign="top" align="left" width="700" colspan="2" height="20"></td>
</tr>
</table>
</center>
</div>
<div align="center">
<center>
<table border="0" cellpadding="0" cellspacing="0" width="700">
<tr>
<td valign="top" align="center" width="700"><b><font color="#FF0000" face="Arial" size="2">MailForm V 1.0</font></b><font size="1" face="Arial"><br><a href="http://www.bluewavedata.com">Powered by Blue Wave Data</a></font></td>
<td valign="top" align="left" width="50"></td>
</tr>
</table>
</center>
</div>
</body>
</html>
<!-- END Blue Wave Data Mail Form FOOTER -->
****USE THIS PART (BELOW) TO PROCESS****
<?php
/*
Copyright 2002 Blue Wave Data, LLC ALL RIGHTS RESERVED
http://www.bluewavedata.com
PLEASE LEAVE THIS COPYRIGHT IN PLACE
*/
// ************* MODIFY THE NEXT THREE LINES *****************************
$title = "My Home Page"; // <--- PUT THE TITLE OF YOUR HOME PAGE BETWEEN THE "" MARKS
$home = "http://www.MyHomePage.com"; // <--- PUT YOUR URL BETWEEN THE "" MARKS
$mailto = "me@email.com"; // <--- PUT YOUR E-MAIL ADDRESS BETWEEN THE "" MARKS
// ********************* MODIFY NO MORE ********************************
// Thanks for the feedback etc.
PRINT "<html><head><title>Thank you</title></head><body><div align=\"left\"><table border=\"0\" cellpadding=\"2\" cellspacing=\"0\" width=\"100%\"><tr><td width=\"100%\" height=\"50\"></td></tr><tr><td width=\"100%\" valign=\"top\" align=\"left\"><p align=\"center\"><font face=\"Arial\" size=\"3\">Your message has been sent.<BR>Thank you $uname, for your input.</font></p><p align=\"center\"><font face=\"Arial\" size=\"4\"><a href=\"$home\">Back To $title </a></font></p></td></tr><tr><td width=\"100%\" height=\"20\"></td></tr></table></div></body></html>";
//include("thanks.htm"); // or create a "thank you" page and uncomment this line (remember to comment "//" the section above)
// Scrape off the slashes before processing
$umsg = stripslashes($umsg);
// Here is where we grab and process the form and variables from mailform.php
// and e-mail the results to the value of "$mailto"
I don't know if angelfire supports PHP or not, but for PHP, you need to use a .php or .php4 for pages with PHP on them. Often times, free servers require the later.
That script will only work on servers with global variables enabled. You are much better off writing them so they work even if global variables are disabled. ie. $REMOTE_ADDR should be $_SERVER['REMOTE_ADDR'], and when echoing the form values, rather than doing it like this: $uname it should be $_POST['uname'], etc...
I need help! I dont know PHP, so would someone explain how to upload and setup the form? You can e-mail me at creatormaster@aol.com instead of the forum if you would like. My AIM name is creatormaster too...
WARNING: non-exposure to the Son can cause burning!
Originally posted by Jonathan I need help! I dont know PHP, so would someone explain how to upload and setup the form?
If you upload the code pyro provided, you should be able to get it working. If you have a specific question, post here or you can instant message me if you like (s/n is in my profile).
[J]ona
Visit Slightly Remarkable to see my portfolio, resumé, and consulting rates.
Bookmarks