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 01-13-2005, 04:08 PM   #1
collegegirlvids
Confirmed User
 
Join Date: Oct 2004
Location: U of I
Posts: 535
Opt-in mailing script

Would someone be as so kind as to point me toward an opt-in mailing script to add to my tours... the basic opt-in box for pic of the day... blah, blah...

If you can hook me up, I'll definitely do the same back =)
collegegirlvids is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-13-2005, 05:26 PM   #2
calmlikeabomb
Confirmed User
 
calmlikeabomb's Avatar
 
Join Date: May 2004
Location: SW Palm Bay, Florida
Posts: 1,323
If you use sql and php....

Code:
<!-- Begin newsletter form  -->
<form name="newsletter" action="newsletter.php" method=hahahahahaha>
<input type="text" name="email" class="newsletter" style="width:140px" maxlength="70" />
<input type="image" class="newsletter" src="images/subscribe.gif" alt="Subscribe" name="submit" />
<!-- End newsletter form -->

<?php
// Register the user in the database.
	require_once ('mysql_connect.php'); // Connect to the db.
		
	// Create a function for escaping the data.
	function escape_data ($data) {
		global $dbc; // Need the connection.
		if (ini_get('magic_quotes_gpc')) {
			$data = stripslashes($data);
		}
		return mysql_real_escape_string($data, $dbc);
	} // End of function.

	$message = NULL; // Create an empty new variable.
	
	// Check for a email address.
	if (empty($_POST['email'])) {
		$e = FALSE;
		$message .= '<p>You forgot to enter your email!</p>';
	} else {
		$e = escape_data($_POST['email']);
	}
	
	
	if ($e) { // If everything's OK.

			$query = "INSERT INTO newsletter set email='$e'";		
			$result = @mysql_query ($query); // Run the query.
			if ($result) { // If it ran OK.
			
// Send an email
				$body = "Thank you for subscribing to our Penis Enlargement Product newsletter!\n\n
						 Our newsletter will be in your inbox waiting for you every Monday morning.
						 Sincerly,\n
						 Levi Lewis\n
						 www.penis-enlargement-product.us";
				mail (($_POST['email']), 'Thank you for registering!', $body,'From: [email protected]');
				echo '<p>You have been registered!<br> Details of this registration have been sent to your email address.</p>';
								
			} else { // If it did not run OK.
				$message = '<p>You could not be registered due to a system error. We apologize for any inconvenience.</p><p>' . mysql_error() . '</p>'; 
			}		
		} 
		mysql_close(); // Close the database connection.


// Print the error message if there is one.
if (isset($message)) {
	echo '<font color="red">', $message, '</font>';
}
?>

</form>
__________________
subarus.
calmlikeabomb 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.