Menu
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?
[code=php]<?PHP
#######################################################
# This script is Copyright 2003, Infinity Web Design #
# Written by Ryan Brill - [email][email protected][/email] #
# All Rights Reserved - Do not remove this notice #
#######################################################
## The lines below need to be edited...
###################### Set up the following variables ######################
# #
$to = "[email protected]"; #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.nn";
foreach ($_POST as $key => $value) {
$msg .= ucfirst ($key) ." : ". $value . "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.");
}
?>[/code]
[code=php]
****USE THIS PART (BELOW) FOR YOUR FORM PAGE****
<!-- 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 = "[email protected]"; // <--- 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"
$mailfrom = "From: $uemail";
$subject= "$usubj";
$body = "* * * * * BEGIN FEEDBACK * * * * *nnSent from IP: $REMOTE_ADDRnName: $unamenEMail: $uemailnTelephone: $uphonenSubject: $usubjnMessage: $umsgnn* * * * * END FEEDBACK * * * * *";
mail ($mailto, $subject, $body, $mailfrom);
?>
[/code]
[i]Originally posted by Jonathan [/i]
[B]I need help! I dont know PHP, so would someone explain how to upload and setup the form?[/B][/QUOTE]
0.1.9 — BETA 5.18