switch ($_POST[ action ]) { case Add (Web site developers) New Mailing List :

switch ($_POST[ action ]) { case Add New Mailing List : $sql = INSERT INTO ml_lists (listname) . VALUES ( . $_POST[ listname ] . ) ; mysql_query($sql) or die( Could not add mailing list. . mysql_error()); break; case Delete Mailing List : $sql = DELETE FROM ml_lists WHERE ml_id= . $_POST[ ml_id ]; mysql_query($sql) or die( Could not delete mailing list. . mysql_error()); $sql = DELETE FROM ml_subscriptions . WHERE ml_id= . $_POST[ ml_id ]; mysql_query($sql) or die( Could not delete mailing list subscriptions. . mysql_error()); break; case Send Message : if (isset($_POST[ msg ], $_POST[ ml_id ])) { if (is_numeric($_POST[ ml_id ])) { $sql = SELECT listname FROM ml_lists . WHERE ml_id= . $_POST[ ml_id ] . ; $result = mysql_query($sql, $conn) or die(mysql_error()); $row = mysql_fetch_array($result); $listname = $row[ listname ]; } else { $listname = Master ; } $sql = SELECT DISTINCT usr.email, usr.firstname, usr.user_id . FROM ml_users usr . INNER JOIN ml_subscriptions mls . ON usr.user_id = mls.user_id . WHERE mls.pending=0 ; if ($_POST[ ml_id ] != all ) { $sql .= AND mls.ml_id= . $_POST[ ml_id ]; } $result = mysql_query($sql) or die( Could not get list of email addresses. . mysql_error()); $headers = From: . ADMIN_EMAIL . rn ; while ($row = mysql_fetch_array($result)) { if (is_numeric($_POST[ ml_id ])) { $ft = You are receiving this message as a member of the ; $ft .= $listname . n mailing list. If you have received ; $ft .= this email in error, or would like ton remove your ; $ft .= name from this mailing list, please visit the ; 490 Chapter 14
We would like to recommend you tested and proved virtual web hosting services, which you will surely find to be of great quality.

Leave a Reply