"; mysql("$DBName","Delete from emails where email='$email' AND listID='$leavelistID'"); mysql("Cart","Insert Into EVENTS values('$eventID','$packID','$email unsubscribed from $leavelistID','$buyerID','MailManager','$DTG','$amount')"); } for($count = 0; $count < sizeof($join); $count++) { $joinlistID=$join[$count]; // echo "JoinListID $joinlistID
"; //-------------------- Need way to check existing ---------------------- $checkexist=mysql("$DBName","Select * from emails where email='$email' AND listID='$joinlistID'"); $chekit=mysql_num_rows($checkexist); if($chekit=='0'){ mysql("$DBName","Insert into emails values('','$email','0','$joinlistID','$DTGShort')"); } mysql("Cart","Insert Into EVENTS values('$eventID','$packID','$email subscribed to $joinlistID','$buyerID','MailManager','$DTG','$amount')"); } if($join){ echo "

Thank you! You've been added to the lists you've chosen."; } if($leave){ echo "

I'm sorry you've chosen to leave one or more of our lists. We invite you to browse through and subscribe to one or more lists. Click on the Info for more information on this list. ALL of our lists are SPAM-FREE"; } } if($email){ echo "
Welcome $email"; echo "
You can choose to subscribe to our newsletters
(or unsubscribe to those you are currently subscribed to).
We do not flood your inbox, and take care to not send duplicate information no matter how many newsletters you are subscribed to.
Note - all our lists are spam and hype free, and we strictly protect your email addresses. I hate spam as much as anyone!

"; $DBName="MyMail"; mysql_connect("$DBHost","$DBUser","$DBPass"); $select=mysql("$DBName","SELECT * from lists where Owner='bizshop' Order By listName"); echo ""; echo ""; if($Info){ $det=mysql("$DBName","Select listDescription from lists where listID='$Info'"); while ($detrows=mysql_fetch_row($det)){ $details=$detrows[0]; } $Details="$details"; // echo ""; } while ($result = mysql_fetch_row($select)) { //--------------------------------- Walk Through All Lists $thelistID=$result[0]; $thelistName=$result[1]; $indiv=mysql("$DBName","SELECT Distinct * from emails where email='$email' and listID='$thelistID'"); $chek=mysql_num_rows($indiv); //---------------------------------Find current subscriptions if ($chek > '0'){ $Details=stripslashes($Details); // ------------------------Mark as existing while ($result = mysql_fetch_row($indiv)) { echo " "; if($Info==$thelistID){ echo ""; } $chek='0'; } } else { echo " "; if($Info==$thelistID){ echo ""; } } //--------------------------------------Get subscription info //--------------------------------------Setup form //--------------------------------------List lists //--------------------------------------submit form //--------------------------------------handle submission //--------------------------------------show thank you } echo "
$Details
$thelistName$thelistIDUnsubscribe:"; echo "Info
$Details
$thelistName$thelistIDSubscribe Info
$Details
"; echo ""; echo ""; } else { echo "

"; echo "Please enter the email address you are subscribed with:

"; echo ""; echo "

"; } include("footer.php"); ?>