Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Post New Thread Reply

Register GFY Rules Calendar Mark Forums Read
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 04-22-2006, 01:26 PM   #1
BannerDept
Confirmed User
 
Join Date: Apr 2006
Posts: 511
Need Help With Email Form Setup

Looking for links/tutorials on setting up an email form on my website, that allows people to fill in their subject, email address, message and submit it to me...using my email server.

Any help would be greatly appreciated. Thanks.
BannerDept is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-22-2006, 01:46 PM   #2
BannerDept
Confirmed User
 
Join Date: Apr 2006
Posts: 511
bump bump bump
BannerDept is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-22-2006, 01:51 PM   #3
SmokeyTheBear
►SouthOfHeaven
 
SmokeyTheBear's Avatar
 
Join Date: Jun 2004
Location: PlanetEarth MyBoardRank: GerbilMaster My-Penis-Size: extralarge MyWeapon: Computer
Posts: 28,609
save this as email.php then go to it..

Code:
    <?php
    $fileLocation = $HTTP_SERVER_VARS["PHP_SELF"];
    $fileName = basename ($fileLocation);

    $notcomplete = false;
    $nodata = false;

    if ( !isset($_POST["mailto"]) ) {
       $nodata = true;
    }
    if ( !isset($_POST["subject"]) ){
       $nodata = true;
    }
    if ( !isset($_POST["email"]) ){
       $nodata = true;
    }
    if ( !isset($_POST["name"]) ){
       $nodata = true;
    }
    if ( !isset($_POST["message"]) ){
       $nodata = true;
    }

    if ($nodata){
    ?>
<center><h1>Anonymail</h1>
    <form action="<?=$fileName?>" method=hahahahahaha>
    <table border="0" cellpadding="0" cellspacing="0"><tr><td>
    Name:<br><input type="text" value="Your Name" name="name" size="20"><br>
    Email:<br><input type="text" value="[email protected]" name="email" size="20"><br>
    Subject:<br><input type="text" value="Your Subject" name="subject" size="20"><br>
    Send to:<br><input type="text" value="[email protected]" name="mailto" size="20"><br>
    Message:<br><textarea name="message" cols="30" rows="6"></textarea><br>
    <input type="submit" name="submit" value=" Send "></td></tr></table></form>
    <?php
      exit("");
    }//end if nodata

    if ( trim($_POST["mailto"] hahahaha "") ){
       $notcomplete = true;
    }
    if ( trim($_POST["subject"] hahahaha "") ){
       $notcomplete = true;
    }
    if ( trim($_POST["email"] hahahaha "") ){
       $notcomplete = true;
    }
    if ( trim($_POST["name"] hahahaha "") ){
       $notcomplete = true;
    }
    if ( trim($_POST["message"] hahahaha "") ){
       $notcomplete = true;
    }

    if ($notcomplete){
         echo "missing required parameter";
         //you could change the a
         exit ('a href="javascript:history.back(1)"> click here a');
    }
    $mailto = $_POST["mailto"];
    $email = $_POST["email"];
    $subject = $_POST["subject"];
    $message = $_POST["message"];
    $name = $_POST["name"];

    //$mailto = "$mailto";
    //$subject = "$subject";
    $msg = ereg_replace("\\\'", "'", $message);
    $msg1 = ereg_replace('\\\"', "\"", $msg);
    $message1 = "From: $name\nemail: $email\nmessage:\n$msg1";
    $sent = mail($mailto, $subject, $msg, "From: $email\r\nReply-to: $email\r\n");
    if ($sent){
         echo ("Your Email has been sent to $mailto!");
    }else{
         echo "Message sending Failed";
    }

    ?>
__________________
hatisblack at yahoo.com
SmokeyTheBear is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-22-2006, 01:53 PM   #4
SmokeyTheBear
►SouthOfHeaven
 
SmokeyTheBear's Avatar
 
Join Date: Jun 2004
Location: PlanetEarth MyBoardRank: GerbilMaster My-Penis-Size: extralarge MyWeapon: Computer
Posts: 28,609
gfy fucks up the code

where it says hahaha the first time should say post

then the rest of the hahaha's should read ==
__________________
hatisblack at yahoo.com
SmokeyTheBear is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-22-2006, 01:57 PM   #5
SmokeyTheBear
►SouthOfHeaven
 
SmokeyTheBear's Avatar
 
Join Date: Jun 2004
Location: PlanetEarth MyBoardRank: GerbilMaster My-Penis-Size: extralarge MyWeapon: Computer
Posts: 28,609
Code:
    <?php
    $fileLocation = $HTTP_SERVER_VARS["PHP_SELF"];
    $fileName = basename ($fileLocation);

    $notcomplete = false;
    $nodata = false;

    if ( !isset($_POST["mailto"]) ) {
       $nodata = true;
    }
    if ( !isset($_POST["subject"]) ){
       $nodata = true;
    }
    if ( !isset($_POST["email"]) ){
       $nodata = true;
    }
    if ( !isset($_POST["name"]) ){
       $nodata = true;
    }
    if ( !isset($_POST["message"]) ){
       $nodata = true;
    }

    if ($nodata){
    ?>
<center><h1>Anonymail</h1>
    <form action="<?=$fileName?>" method="post">
    <table border="0" cellpadding="0" cellspacing="0"><tr><td>
    Name:<br><input type="text" value="Your Name" name="name" size="20"><br>
    Email:<br><input type="text" value="[email protected]" name="email" size="20"><br>
    Subject:<br><input type="text" value="Your Subject" name="subject" size="20"><br>
    Send to:<br><input type="text" value="[email protected]" name="mailto" size="20"><br>
    Message:<br><textarea name="message" cols="30" rows="6"></textarea><br>
    <input type="submit" name="submit" value=" Send "></td></tr></table></form>
    <?php
      exit("");
    }//end if nodata

    if ( trim($_POST["mailto"] == "") ){
       $notcomplete = true;
    }
    if ( trim($_POST["subject"] == "") ){
       $notcomplete = true;
    }
    if ( trim($_POST["email"] == "") ){
       $notcomplete = true;
    }
    if ( trim($_POST["name"] == "") ){
       $notcomplete = true;
    }
    if ( trim($_POST["message"] == "") ){
       $notcomplete = true;
    }

    if ($notcomplete){
         echo "missing required parameter";
         //you could change the a
         exit ('a href="javascript:history.back(1)"> click here a');
    }
    $mailto = $_POST["mailto"];
    $email = $_POST["email"];
    $subject = $_POST["subject"];
    $message = $_POST["message"];
    $name = $_POST["name"];

    //$mailto = "$mailto";
    //$subject = "$subject";
    $msg = ereg_replace("\\\'", "'", $message);
    $msg1 = ereg_replace('\\\"', "\"", $msg);
    $message1 = "From: $name\nemail: $email\nmessage:\n$msg1";
    $sent = mail($mailto, $subject, $msg, "From: $email\r\nReply-to: $email\r\n");
    if ($sent){
         echo ("Your Email has been sent to $mailto!");
    }else{
         echo "Message sending Failed";
    }

    ?>
__________________
hatisblack at yahoo.com
SmokeyTheBear is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-22-2006, 01:58 PM   #6
SmokeyTheBear
►SouthOfHeaven
 
SmokeyTheBear's Avatar
 
Join Date: Jun 2004
Location: PlanetEarth MyBoardRank: GerbilMaster My-Penis-Size: extralarge MyWeapon: Computer
Posts: 28,609
there you go , that should work

just make the "to" box hidden so they cant send email to anyone ( or alter the php to a set value )
__________________
hatisblack at yahoo.com
SmokeyTheBear is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-22-2006, 02:05 PM   #7
BannerDept
Confirmed User
 
Join Date: Apr 2006
Posts: 511
hey thanks man, do you happen to have icq? Just have a quick question

Thanks again
BannerDept is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-22-2006, 02:07 PM   #8
SmokeyTheBear
►SouthOfHeaven
 
SmokeyTheBear's Avatar
 
Join Date: Jun 2004
Location: PlanetEarth MyBoardRank: GerbilMaster My-Penis-Size: extralarge MyWeapon: Computer
Posts: 28,609
yup its in my sig if you need some help
__________________
hatisblack at yahoo.com
SmokeyTheBear is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks
Thread Tools



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.