I have a members page setup an going what i am trying to is this.If they dont enter an icq# i want it to put NA on the page it goes to same with homepage.But in same aspect if they do put an icq# i want it to add it to the page with a link to it an show an image i have stored on my server.This is what i have come up with but its not work
<?
require("dbconn.php");
$sql=("SELECT em_members.em_member_name,em_members.em_icq,em_members.em_homepage,em_members.em_aim FROM em_members");
$result=mysql_query($sql, $conn) or die ("Can't connect because ".mysql_error());
$icq=("SELECT em_members.em_icq FROM em_members");
echo '<TABLE BORDER = "10" CELLSPACING = "10" CELLPADDING = "10" WIDTH = "100%" MYSW_TABLETYPE = "TT_PERCENT" MYSW_TABLEREN = "RT_CERN"><tr>';
$i = 0;
while ($rows=mysql_fetch_array($result)){
echo '<td>'.$rows['em_member_name'].'</td>';
echo '<td>'.$rows['em_icq'];
$icq = $row["icq"];
if ($icq == "n/a") {
$icqlink = "n/a";
}
else {
$icqlink = "<my url>$icq</a>";
}
echo '<td>'.$rows['em_homepage'].'</td>';
if ($i++%1 == 0) {
echo '</tr><tr>';
}
}
echo '</tr></table>';
?>