PHP Code:
<table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
           <?
           
if ($sid) {
           
$conn mysql_query("SELECT * FROM projects where catid = $sid"); } else {
           
$conn mysql_query("SELECT * FROM projects");
           }
$rows mysql_num_rows($conn);
$ccnt '0';
while (
$rows $ccnt) {

$connlist[$ccnt] = mysql_fetch_array($conn);
           
           
?>
           
           <?if (bcmod($ccnt2) == 0) {?> </tr><tr> <?}?>
            <td align="center"><table width="190" border="0" cellspacing="0" cellpadding="0" style="border: 2px solid white;">
              <tr>
                <td bgcolor="#FFFFFF" style="padding:2px;"><img src="images/bullet.gif" width="8" height="7" align="absmiddle" /> <?=$connlist[$ccnt]['name']?></td>
              </tr>
              <tr>
                <td align="center" bgcolor="#E2DFDF" style="padding:5px"><a href="index.php?id=<?=$id?>&sid=<?=$sid?>&pid=<?=$connlist[$ccnt]['id']?>"><img src="../img/projects/<?=$connlist[$ccnt]['image']?>" width="174" height="78" border="1" /></a></td>
              </tr>
            </table></td>
            <? // $ccnt2++; } ?>
<? $ccnt
++; } ?>
          </tr>
        </table>
I'm having a problem here, this code is to fetch images and names from the "projects" table where it has these fields: id, name, para, image, catid

Now what I want is for the "pid" to work, so that when I click on any thumbnail to take me to the project's info/details.
I tried adding
PHP Code:
if ($pid
But it didn't work, can you please help me?