Hi tomatolover,
if the error is in your SQL statement try changing it from:
$query = "SELECT * FROM table_status WHERE Program='$app' AND ProgAY='$year'";
to:
$query = "SELECT * FROM table_status WHERE (Program='$app' AND ProgAY='$year')";
the close & open parenthesis might help
also, i notice this statement in your code
$result = @($query); //run the query
maybe you can get rid of the @ sign, i usually code like this
$result = mysql_query($query); //run the query
if it doesn't work yet try removing MYSQL_NUM from this statement
$row = mysql_fetch_array($result, MYSQL_NUM);
make it simpler like this
$row = mysql_fetch_array($result);
hope this helps