100) $financial_error = "Your street address must be less than 100 characters."; // City checks elseif (strlen($_POST[city]) > 50) $financial_error = "Your city must be less than 50 characters."; elseif (preg_match("/[^a-zA-Z0-9 ,\(\)\.-]/", $_POST[city])) $financial_error = "Your city contains invalid characters. Please use only alphanumeric characters."; // State check elseif (!preg_match("/[A-Z]{2}/", strtoupper($_POST[state]))) $financial_error = "Please use the two letter code for your state. A list can be found here."; // Zipcode check elseif (!preg_match("/\d{5}-\d{4}/", $_POST[zip]) and !preg_match("/\d{5}/", $_POST[zip])) $financial_error = "Please enter your zip code in the format xxxxx or xxxxx-xxxx."; else // Passed! Insert their information into the database. { // Escape everything $safelocal = mysql_escape_string($locale); $safefirst = mysql_escape_string($_POST[first]); $safelast = mysql_escape_string($_POST[last]); $safestreet= mysql_escape_string($_POST[street]); $safecity = mysql_escape_string($_POST[city]); $safestate = mysql_escape_string(strtoupper($_POST[state])); $safezip = mysql_escape_string($_POST[zip]); $safeemail = mysql_escape_string(strtolower($_POST[email])); $safehomephone = mysql_escape_string($_POST[homephone]); $safeworkphone = mysql_escape_string($_POST[workphone]); $safemobilephone = mysql_escape_string($_POST[mobilephone]); $safecontacttime = mysql_escape_string($_POST[contacttime]); $safelist = mysql_escape_string($_POST['list']); $safetimeframe = mysql_escape_string($_POST[timeframe]); $safeadded = mysql_escape_string(date("Y-m-d H:i:s")); $insert = "INSERT INTO wantlist (locale, first, last, street, city, state, zip, email, homephone, workphone, mobilephone, contacttime, list, timeframe, date_added) VALUES('$safelocale', '$safefirst', '$safelast', '$safestreet', '$safecity', '$safestate', '$safezip', '$safeemail', '$safehomephone', '$safeworkphone', '$safemobilephone', '$safecontacttime', '$safelist', '$safetimeframe', '$safeadded')"; mysql_query($insert) or die("Failed to update database! Please contact the site administrator."); // We also need to craft and email this information. if ($_POST['list'] == "miller") $list = "hire the Jon Miller Team"; elseif ($_POST['list'] == "another") $list = "go with different agent"; elseif ($_POST['list'] == "fsbo") $list = "sell it themselves (FSBO)"; else $list = "do... something. They don't know yet"; if ($_POST[contacttime] == "now") $contacttime = "immediately"; elseif ($_POST[contacttime] == "3") $contacttime = "in three months or less"; elseif ($_POST[contacttime] == "326") $contacttime = "in three to six months"; else $contacttime = "in more than six months"; $email = "$_POST[first] $_POST[last] has requested information about selling their home from the $locale $extension Miller Team website.\n \n Name: $_POST[first] $_POST[last]\n Address: $_POST[street], $_POST[city], $_POST[state], $_POST[zip]\n Email: $_POST[email]\n Home Phone: $_POST[homephone]\n Work Phone: $_POST[workphone]\n Mobile Phone: $_POST[mobilephone]\n Best time to contact: $_POST[contacttime]\n\n For a real estate agent they plan to $list.\n\n They plan to sell their home $contacttime.\n\n This information has been stored in the database if it needs to be retrieved at a later time."; //echo $email; mail("jon@millerhome.us", "Miller Team Home Seller", $email); // Close it up. Successful completion of form. ?>
See Your Home Listed Here
Thank you for submitting your information. We will contact you by phone or email shortly.

Click here to return to the Jon Miller Team home page.
$value) $_POST[$key] = preg_replace("/\"/", "", $value); */ } // We're going to want to automatically fill in their information. if ($authenticated) { $safename = mysql_escape_string($user[name]); $select = "SELECT firstname, lastname, street, city, state, zip, phone, email FROM users WHERE username = '$safename'"; $result = mysql_query($select) or die("Failed to query database. Please contact the site administrator."); $row = mysql_fetch_array($result); $row[homephone] = $row[phone]; foreach ($row as $key => $value) $row[$key] = preg_replace("/\"/", "", $value); } if ($_POST['list'] == null or $financial_error != null) { ?>
See Your Home Listed Here
Jon Miller Hello, I'm Jon Miller. Thank you for asking how I can help you sell your home. Our internet marketing creates a lot of home buyer traffic for our seller's homes. Please review our comprehensive Seller Marketing Services page to learn how my team will sell your home. In the meantime, please complete the following form if you want internet exposure in the Featured Homes section of our web site.

$financial_error

\n" : ""; ?>
First Name:
Last Name:

Street Address:
City: State: Zip:

Email:
Home Phone:
Work Phone:
Mobile Phone:
Please use the format: xxx-xxx-xxxx

What is the best time to contact you?


Have you hired a real estate agent to represent you?


Time Frame for Selling




By submitting this form with your telephone number you are requesting Jon Miller or an authorized representative of the Jon Miller Team at Keller Williams Realty Bellevue to contact you even if your name is on the Federal "Do Not Call List." This information will be used for the purpose of assisting you with your real estate marketing needs.