Results 1 to 6 of 6
Thread: sweeeeeet...need a script:
-
08-20-2002, 01:42 PM #1Junior Guru
- Join Date
- May 2002
- Posts
- 195
sweeeeeet...need a script:
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?
-
08-20-2002, 02:02 PM #2WHT Addict
- Join Date
- Aug 2002
- Location
- Davis, CA
- Posts
- 168
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.
-
08-20-2002, 02:10 PM #3Web Hosting Master
- Join Date
- Aug 2002
- Location
- Chandler, Arizona
- Posts
- 2,564
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
-Robert Norton
www.SophMedia.com
-
08-20-2002, 02:32 PM #4Web Hosting Master
- Join Date
- May 2001
- Location
- Dayton, Ohio
- Posts
- 4,977
http://www.ledscripts.com/index.php?...hp/ledformmail
Has about what you want..
-
08-20-2002, 05:18 PM #5Web Hosting Master
- Join Date
- May 2001
- Location
- @ Work - Usually!
- Posts
- 835
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
-
08-20-2002, 06:08 PM #6Web Hosting Master
- Join Date
- May 2001
- Location
- Dayton, Ohio
- Posts
- 4,977
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 Code:<?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);
?>