Jump to content

Recommended Posts

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

Link to comment
https://forums.phpfreaks.com/topic/280250-need-help-with-a-widget-on-my-site/
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.