query($sql); $count = mysqli_num_rows($result); if($count == 0){ $passwordCheck = false; } } //attempts to insert subscriber into subscribe table $sql = "INSERT INTO subscribe (biz_title, brand, comp_name, sal, first_name, last_name, address, address_2, city, state, zip, country,". "mail_to, alt, area_code, phone, area_code_fax, fax, email, month, subscribe, status, am_id, opt_inla, opt_inlc, opt_intle, opt_ineb, pass,". "edited) VALUES ". "('$biz_title', '$brand', '$comp_name', '$sal', '$first_name', '$last_name', '$address', '$address_2', '$city' , '$state', '$zip', '$country', ". "'$mail_to', '$alt_mail', '$area_code', '$phone', '$area_code_fax', '$fax', '$email','$month', ". "'$subscribe', '$status', '$am_id', '$opt_inla', '$opt_inlc', '$opt_intle', '$opt_ineb', '$pass', NULL)"; if(mysqli_query($conn, $sql)){ echo ""; } else{ echo "ERROR: Could not able to execute $sql. " . mysqli_error($conn); } //attempts to update ylist on subscriber from above $sql = "UPDATE subscribe SET ylist_id = '" . $ylist_id . "', needs = '" . $needs . "' WHERE first_name='" . $first_name . "' AND last_name='" . $last_name . "' AND email='" . $email . "'"; if(mysqli_query($conn, $sql)){ echo ""; } else{ echo "ERROR: Could not able to execute $sql. " . mysqli_error($link); } //sends password to user $to = $email; $subject = ' Re: LADetails Account'; $msg = $first_name . ", you have successfully completed the New Subscription Request Application. \n" . "Here is your password for LandscapeArchitect.com: \n" . "Password: " . $pass . "\n". " \n" . "We encourage you to browse the Product Information Request page and request \n" . "any product information you need from our vendors. In order to provide you \n" . "with timely service, all product information requests are processed weekly. \n" . " \n" . "Thank you for visiting LandscapeArchitect.com. \n" . " \n" . "The largest landscape oriented database on the web!" ; mail ($to, $subject, $msg, 'From:' . $email); $DISPLAY = []; ?>