I'm trying to get this page to work but need assistance.

-------------------------------
CODE--------------------------------------
<?php
$GLOBALS["FF_GLOBALS_VERBOSE"] = true; // For debugging purposes 
include("database.php");

ini_set ('display_errors', 1);
error_reporting (E_ALL & ~E_NOTICE);

$conn = mysql_connect("localhost", "jcweb##_test", "test") or die
(mysql_error()); mysql_select_db("jcweb06_test", $conn) or die
(mysql_error());

$appt_date = $_POST['appt_month'] . '/' . $_POST['appt_day'] . '/' .
$_POST['appt_year'];
$phone = $_POST['phone1'] . '-' . $_POST['phone2'] . '-' .
$_POST['phone3'];
$appt_time = $_POST['appt_time'];


$query = "SELECT appt_date, appt_time FROM pest_control WHERE 
appt_date = '$appt_date' and appt_time = '$appt_time'";


$result = mysql_query ($query);
if(mysql_num_rows($results) > 0)
{
    echo "Success";
}
else
}
    echo "No Records Returned";
}
?>
-----------------------------------------END
CODE--------------------------------------------------------------

When I do a print or echo of the variables I have set it does return 
data so I think the problem is in my SQL statement. I have tried 
everything I could think of but the page just returns blank and 
doesn't print my message.

Any help is appreciated.


Reply via email to