
if ($_POST[submit]) {
$q = "INSERT into $_POST[type] (fullname, phone, cellphone, email, website, comments, notes, status) VALUES ('$_POST[fullname]', '$_POST[phone]', '$_POST[cellphone]', '$_POST[email]', '$_POST[website]', '$_POST[comments]', '', 'interested')";
$r = mysql_query($q);
echo mysql_error() . "
";
if ($r) {
$to = "lisi@kosher-ads.com";
$subject = "Potential " . ucfirst($_POST[type]);
$header = "From: $_POST[fullname] <$_POST[email]>\n";
$header .= "Reply-To: $_POST[email]\n";
$msg .= "Name: $_POST[fullname]\nPhone: $_POST[phone]\nCellphone: $_POST[cellphone]\nEmail: $_POST[email]\nWebsite: $_POST[website]\nComments:$_POST[comments]\n";
mail($to, $subject, $msg, $header);
echo "
} ?>