Chaps
08-20-2002, 01:42 PM
I need a form to e-mail script. I know there are billions out there. but I need one that is very easy to configure and just takes form info and e-mails it. That's all...I don't want all the other crap every other script does...this is all I want...oh and I want it to redirect to an html page once submitted. Anyone got an easy one?
wakkow
08-20-2002, 02:02 PM
PHP makes this really simple.. Create a form that posts the info to your php file.. All the form fields are now variables. Do simple email validity checking (optional) then push it into the mail() function (http://www.php.net/manual/en/ref.mail.php). Then just put your thanks page after the script.
interactive
08-20-2002, 02:10 PM
this is a pretty dumb way to do it but id just mail yourself the $QUERY_STRING it would give you all the variables posted to that page. hth
The Prohacker
08-20-2002, 02:32 PM
http://www.ledscripts.com/index.php?page=free/php/ledformmail
Has about what you want..
mlovick
08-20-2002, 05:18 PM
Originally posted by interactive
this is a pretty dumb way to do it but id just mail yourself the $QUERY_STRING it would give you all the variables posted to that page. hth
Wow - that real clever :D
The Prohacker
08-20-2002, 06:08 PM
Yup.. Its one of the easiest ways todo it...
I did a quick and simple formmail script, there is no checking so use at your own risk:
<?php
//Change these:
$you = "you\@bleh.net";
$redirect = "http://www.yourdomain.com/thanks.html";
//Main Program:
$buffer = $QUERY_STRING;
$buffer = ereg_replace( "&","\n",$buffer);
$buffer .= "\nIP: $REMOTE_ADDR";
mail($you,"Site Mailer",$buffer,"From: Site Mailer");
header("Location: " . $redirect);
?>