\n"; return(mail("\"".$contactname."\" <".$contactemail.">", $subject, $message, $headers)); } function is_email_valid($email) { if(eregi("^[a-z0-9\._-]+@+[a-z0-9\._-]+\.+[a-z]{2,3}$", $email)) return TRUE; else return FALSE; } function quote_smart($value) { if (get_magic_quotes_gpc()) { $value = stripslashes($value); } if (!is_numeric($value)) { $value = "'" . mysql_real_escape_string($value) . "'"; } return $value; } $ip = $_SERVER['REMOTE_ADDR']; $dbh=mysql_connect ("localhost", "healthy_healthy", "johnflorybond") or die ('I cannot connect to the database.'); mysql_select_db ("healthy_living"); $host = $_SERVER["HTTP_HOST"]; $cp = strpos($host,'healthy-living.org'); if ($cp === false) $sub = $host; elseif ($cp == 0) $sub = 'www'; else $sub = substr($host,0,$cp-1); $cp = strpos ($sub,'www.'); if ($cp === false) {} elseif ($cp == 0) $sub = substr($sub,4); $path = substr($_SERVER["SCRIPT_NAME"],1); //create email to send if ($Submit == 'Subscribe to Free Newsletter') { $Submit = 'Subscribe to Healthy-Living.Org Newsletter'; $flag = 1; } if ($Submit == 'Subscribe to Healthy-Living.Org Newsletter') { if ($first) $url_first = urlencode($first); elseif (!$flag) $errors .= "
  • No first name provided"; if ($last) $url_last = urlencode($last); elseif (!$flag) $errors .= "
  • No last name provided"; if (!is_email_valid($email)) $errors .= "
  • Invalid Email Address"; if ($errors) { echo ("Your request could not be processed for the following reasons:
    \n"); echo $errors; exit(0); } else { $query = sprintf("INSERT INTO newsletter (first,last,email,ip,tld) values (%s,%s,%s,%s,%s)", quote_smart($first), quote_smart($last), quote_smart($email), quote_smart($ip), quote_smart($sub)); $result = mysql_query($query,$dbh); if (!$result) { echo "Invalid query: $query: " . mysql_error(); exit(0); } $id = mysql_insert_id(); $body = "Hi $first,
    \n
    \n This email confirms your request to subscribe to the Healthy-Living.Org
    monthly nutrition newsletter. You may unsubscribe at any time by following
    instructions that will be provided at the end of each newsletter. In order
    for your subscription to actually begin you must click on the following link:
    Start my Healthy-Living.Org nutriton newsletter subscription.
    \n"; send_mail('Healthy-Living.Org','subscription.confirmation@healthy-living.org',"$first $last",$email,'Subscription Confirmation',"$body"); header ("Location: http://$sub.healthy-living.org/html/fn_post.php"); exit(0); } } ?> Free Newsletter

    Subscribe to the Healthy-Living
    Newsletter

     

    Home

    1 Out of 20 Odds

    Habits of Health

    Who's At Risk?

    Latest Research

    Why Supplement?

    Enter our Contests

    Feeling Great

    Products Ordering

    Crusader Center

    The Crusade

    Tell A Friend

    Nutrition knowledge in your inbox.

    Subscribe to the monthly Healthy-Living.Org newsletter for the latest news about maintaining the human body in a condition of health.

    We will never divulge your E-mail address to anyone else!  You may unsubscribe at any time.

    First Name

    Last Name

    E-mail Address

    The information provided in this web site teaches a non-medical “philosophy” that increasing nutrition and decreasing toxins within the human body are smart practices. Besides seeking for improved health through these means, we always recommend that professional medical advice be sought out in regard to your health. Nothing in this web site is intended to diagnose, prevent, treat or cure disease. No statements herein have been evaluated by the FDA.

    © 2002-2005 Healthy-Living.Org. All rights reserved.

    [Home] [What a Choice?] [Habits of Health] [Health Topics] [Who's at Risk?] [Latest Research] [Why Supplement?] [Enter our Contest] [Free Newsletter] [Free Audio Tape] [zz] [Try Seven Essentials] [Crusader Center] [The Crusade] [Shopping] [Testimonials] [Who Do You Trust] [Challenges] [1,000 & Counting]