Thnx but quote is not required becos the script runs without the condition and the EventsID is integer . I feel it is around the position of the statement within html, I am new to html and not sure whether I have added the script in the write places. How else can I implement this objective, Could for instance use three pages, one to check and the other to direct to either of the pages, is the script below ok:
<?
include("connect.php");
$sql = "Select * From qryAwards WHERE EventsID = $EventsID AND EventStatus = 'Active'";
$result = odbc_exec($connection, $sql);
// The line below checks to see how many rows of information are returned.
$number_rows = odbc_num_rows($result);
// If 1 or more rows are returned then we have some data so print the table:
if($number_rows >= 1){
header("Location: [url]http://localhost/sajjadsumar/studentsfrm.php[/url]");
}
else{
header("Location: [url]http://localhost/sajjadsumar/failed.php[/url]");
}
include("disconnect.php");
?>
<html>
<head>