Go Back   CodingForums.com > :: Server side development > PHP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 05-28-2007, 11:00 AM   PM User | #1
Snitz
Regular Coder

 
Join Date: Jul 2004
Location: Lebanon
Posts: 223
Thanks: 6
Thanked 0 Times in 0 Posts
Snitz is an unknown quantity at this point
Please help

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?
Snitz is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 11:57 PM.


Advertisement
Log in to turn off these ads.