";
if (empty ($phone) && empty ($email))
header ("Location: he_empty_form.php");
else {
mail ($to, $subject, $body, $headers);
header ("Location: he_thank_form.php");
//Insert into mysql
$tblname = "hd_co_il_small_form";
$host = 'helendoron.org';
$database = 'hele10';
$user = 'hele10';
$pswd = 'shrek';
$link = mysql_connect($host, $user, $pswd) or die("Could not connect to host $host");
mysql_select_db($database) or die("Could not select database: $database");
$query ="INSERT INTO $tblname (name,phone,email,city,interest,daf,text) VALUES ('$name','$phone','$email','$city','$interest','$daf','$text')";
$result = mysql_query($query);
if(!$result) {
print "Query: $query
\n";
echo mysql_error();}
}
?>