Can anyone give me a logical explanation why this won't work. I'm feeding $profession in through the url as http://mydomain.com/ArticleList1.php?profession=2. I've verified there a 3 records that meet the criteria. I got no results at all.
thanks
$db = mysql_connect("localhost","**","**");
mysql_select_db("mydb");
$query = mysql_query("SELECT TVolume,TNumber,Title,Credits,CreditsPhysician,CreditsNurse,CreditsPharmacist,Topics,ACPEID,ACPECopy
,ProfessionID,c_status FROM Tests WHERE c_status = '0'")
or die ("Cannot execute query");;
if ($ProfessionID == $profession){
echo "<TR><TD><FONT COLOR=\"#000077\" SIZE=\"3\">Title</B></FONT><BR></TD><TD><CENTER><FONT COLOR=\"#000077\" SIZE=\"3\">Learning Objectives</B></FONT><BR></CENTER></TD><TD><FONT COLOR=\"#000077\" SIZE=\"3\">Contact Hours</B></FONT><BR></TD></TR>";
if ($row = mysql_fetch_array($query)) {
echo "<TR><TD VALIGN=TOP>";
printf ("<A HREF=\"Article.cfm?TVolume=%s&TNumber=%s&Profession=%s\" TARGET=\"rightframe\">",$row['TVolume'], $row['TNumber'],$profession);
printf ("%s</a>",$row['Title']);
}
}