phpdev2013 Posted July 17, 2013 Share Posted July 17, 2013 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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.