"?> E-Newsletter -B&B Flooring providing Ithaca and Cortland with carpet, tile, hardwood, linoleum and window coverings for 20 years!!!

E-Newsletter Archive

Please check back this spring to download the first addition of our E-Newsletter!

Subscribe

$value) { $clean[$key]=mysql_real_escape_string($value); } //Set Varibles form post $firstname=$clean['firstname']; $lastname=$clean['lastname']; $email=$clean['email']; //Check if all values are filled in if ($firstname == "") { echo "

You forgot to enter your first name

"; exit; } if ($lastname == "") { echo "

You forgot to enter your first name

"; exit; } if ($email == "") { echo "

You forgot to enter your email

"; exit; } //see if already in database $sql = "SELECT * FROM contacts WHERE email = '$email';"; $result = mysql_query($sql) or die(mysql_error()); if(mysql_num_rows($result) > 0) { // Already In Database echo "Sorry Our records show that you already have sign up for our newsletter.
Thank you for your intrest intrest in our company"; exit; } else { $sql = "INSERT INTO `contacts` (`lastname`, `firstname`, `email`) VALUES ('$lastname', '$firstname', '$email');"; $result=mysql_query($sql) or die(mysql_error()); // if suceesfully inserted data into database, send confirmation link to email if($result) { // ---------------- SEND MAIL FORM ---------------- // send e-mail to ... $to=$email; // Your subject //$subject="Please Confirm Email To Finish Contest Entry"; $subject="Thank you for signing up for our E-Newsletter"; // From $header="from: B&B Floor Coverings"; // Your message $message="$firstname ,\r\n"; $message.=" \r\n"; $message.="Thank you for signing up to recieve our E-newletter \r\n"; $message.=" \r\n"; $message.="We hope you will find it informative and filled with novel ideas. \r\n"; $message.=" \r\n"; $message.="Please visit http://www.bbfloor.com for sales specials and updated content. \r\n"; $message.=" \r\n"; $message.="We are on Facebook please visit us at http://www.facebook.com/pages/BB-Flooring/276737026919 \r\n"; $message.=" \r\n"; $message.=" \r\n"; $message.="Thank you, \r\n"; $message.="All of us at B&B Floor Coverings \r\n"; // send email $sentmail = mail($to,$subject,$message,$header); } else // if not found { echo "

Wow This is embaressing

"; echo "There seems to be an error on our web site"; echo "Please Contact B&B Floor Coverings"; } // if your email succesfully sent if($sentmail){ // header( 'Location: http://www.bbfloor.com/enter.html' ) ; echo "Thank you $firstname ,
You have been entered into our E-Newsletter mailing list."; } else { echo "

Wow This is embaressing

"; echo "There seems to be an error on our web site"; echo "Please Contact B&B Floor Coverings"; } } } else { //action on normal page load echo"
"; echo ""; echo "
"; echo ""; echo "
"; echo ""; echo "
"; echo ""; echo "
"; echo ""; echo "
"; echo" "; echo "
"; echo ""; echo ""; echo "
"; } ?>