Jump to content

phpdev2013

New Members
  • Posts

    1
  • Joined

  • Last visited

phpdev2013's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hi, I am new to PHP and I have this website I'm working on. The problem is with a widget that is installed on the website which basically shows a list of people. The problem that I am facing is that it should only show a single row of people when the page is loaded and every time the page loads it should display these people randomly. you can have a look at the widget by going www.akhuwatonline.org/test The code that is calling this widget is given below which is a part of the index.php file <ul style="background-color:#FFFFFF; border: 2px solid #126DB3;"> <? $po = 0; foreach($result_set as $row1){$po++;?> <li> <?php $filePath = 'admin/'.$row1['photoPath']; if ($filePath != "" && file_exists($filePath)) { ?> <a href="#tabs-<?=$po?>" title="<?=$row1['firstName'].' '.$row1['lastName']?>" style="background-color:#FFFFFF";> <img src="journalthemb.php?src=<?=$filePath?>&f=0" border="0"></a> <?php } else {?><img src="journalthemb.php?src=admin/borrowerPhoto/thumbs/nophoto.jpg&f=0" border="0"><br /> <?php }?> </li> <? } ?> </ul> I'd appreciate if anyone can help me with sorting this out, also the people coming in the widget are coming from a database which gets updated on a daily basis. I've also attached the index.php file with this post. Thank you. index.php
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.