For some reason, this query always returns a positive even if the field ppic is empty:
$sql = "SELECT ppic from table where UID='$userid'";
$rs = $conn->execute($sql);
$piccheck = $rs->fields['ppic'];
$picpath = "./ppic/" . $piccheck;
$pic = (file_exists($picpath)) ? $picpath : "./ppic/nopic.gif";
All it does is check if the field ppic has an entry, like mypic.jpg, if it is empty, then return nopic.gif
But even when ppic is empty it gives me ./ppic/ in the HTML output....
Sure this must be simple, just can't seem to see it