query strings, global variables

From: Date: Wed, 21 Jan 2004 17:50:15 +0000
Subject: query strings, global variables
Groups: php.general 
Request: Send a blank email to php-general+get-175322@lists.php.net to get a copy of this message
I'm a cold fusion refugee and am having incredible problems with something that I think is relatively easy -- so I must be missing something basic. I would like to pull info from a query string and use it inside a database call I have a navigation bar that includes data pulled from a database. Simplified version below INTO ABOUT CLASSES --section1 --section2 --section3 --section4 I would like to do: //PSEUDO CODE if (section == $sectionName){ display as bold }else{ display normally } PHP SQL call below work nicely: while ($row = mysql_fetch_array($selection)){ echo $row["sectionName"]; } now I would like to do the if/else while ($row = mysql_fetch_array($selection)){ if (section == $sectionName){ echo "<b>" . $row["sectionName"] . "</b>"; }else{ echo $row["sectionName"]; } thx

« previous php.general (#175322) next »