Re: empty variable if/then



try this :

$query = "SELECT * FROM db WHERE city='$city2' AND state='$state2'
ORDER BY title";
if(!$res = mysql_query($query))
{
print("No Result");
}
else
{
while($row = mysql_fetch_assoc($query))
{
if (!isset($url) && empty($url))
{
echo($row['title'] . '<br>');
}
else
{
echo('<b><a href="' . $row['url'] . '>' . $row['title'] .
'</a></b>');
}
}
}

im not shure if I cleary understand the question because im french ...
so .. tell me if that help you !!
by the way u should always valid the $mysql_query before doing anything
:) !

.