";} if($_POST['Email']=="") {$message2= "Please enter your email address
";} if(!isset($message1) && !isset($message2)) { // Done correctly $totcount=emaildouble($_POST['Email']); //echo "totcount: $totcount
"; //dumpIncoming(); if($totcount==0) { addtoDatabase(); sendemail('Watched Video 1st time',$_POST); } else { sendemail('Watched Video again',$_POST); } //exit(); $url="video1.html?id=".$_POST['id']; header("location: $url"); } else { display($message1,$message2,$id); exit(); } echo '

'; contactDatabase(); exit(); } else { display($message1,$message2,$id); } function contactDatabase() { $dns = "localhost"; $dbuser = "createun_ron"; $dbpass = "Coleman9"; $dbname = "createun_members"; mysql_connect ($dns, $dbuser, $dbpass) or die ("Database connection failed"); mysql_select_db ($dbname); } function addtoDatabase() { $sql="INSERT INTO visitors (first,email,date) values ('$_POST[Name]','$_POST[Email]',now())"; if (!mysql_query($sql)) { die('Error: ' . mysql_error()); } //echo "1 record added"; } function emaildouble($email="") { $totcount=0; $sql = "SELECT * FROM visitors WHERE `email` = '$email'"; $result = mysql_query($sql); $totcount = mysql_numrows($result); //echo "totcount: $totcount
"; //exit(); return $totcount; } function sendemail($message1="",$_POST) { //echo "message: $message1
"; //exit(); $fromdisplay='Empower Video'; $replyto='workshops@creatingunlimitedprosperity.com'; $subject=$message1; $to='ron@globalmarketingplus.com'; $email_from=$replyto; //set up the mail //$subject = $_POST['subject']; /*$headers = "MIME-Version: 1.0\r\n"; $headers .= "Content-type: text/html; charset=ISO-8859-1\r\n"; $headers .= "From: ".$fromdisplay." < ".$replyto." > \n"; $headers .= "Reply-To: ".$replyto;*/ $headers = "MIME-Version: 1.0\r\n"; $headers .= "Content-type: text/html; charset=ISO-8859-1\r\n"; $headers = 'From: Empower Video <'.$email_from.'>' . "\n"; $headers .= "Reply-To: ".$email_from; $message=$subject."\n\n"; $message .= "Name: ".$_POST['Name']."\n"; $message .= "Email: ".$_POST['Email']; //send the mail mail($to, $subject, $message, $headers); } $workshop="Harnessing The Power Of Social Media"; $desc='This workshop will share with you 7 secrets to creating your own unlimited prosperity by getting more customers from your website and social media.'; $date=$_GET['date']; $year=$_GET['year']; $dow=$_GET['dow']; $time="6:00 PM to 9:00 PM (MT)"; $shortTime="6PM"; $place="Country Inn & Suites, Bountiful, Utah"; $shortname="Harnessing The Power Of Social Media! Bountiful, Utah - ".$date.", ".$year." - ".$shortTime; $tickettitle="Harnessing The Power Of Social Media!
Bountiful, Utah
".$date.", ".$year." - ".$shortTime; $cost="$199.99"; function display($message1="",$message2="", $id="") { ?> Get Paid With A Blog!

'.$message1.'

';} if ($message2 != "") {echo '

'.$message2.'

';} ?>

Did you envy the man that was paid
$300,000/year
to Blog once a week
while living on a Tropical Island!

Bloggers Needed!
No Blogging Experience Necessary.
Make money while blogging.

Watch a free video
to see if you are who we are looking for
to get paid while blogging!

You could have money being deposited
into your bank account tomorrow!

Simply enter your first name and email address to login to see the FREE video:

First Name:  
Email Address:  


$value) { print "G: $var = $value
\n"; } foreach ($_POST as $var => $value) { print "P: $var = $value
\n"; } foreach ($_SESSION as $var => $value) { print "S: $var = $value
\n"; } foreach ($_COOKIE as $var => $value) { print "C: $var = $value
\n"; } } # -------------------------------------- # ?>