Jump to content

Archived

This topic is now archived and is closed to further replies.

mcmuney

Session Issue

Recommended Posts

I'm using the code below to display new members to my site.
PROBLEM: It works, but ONLY when I'm logged in. When I logout, it displayes blanks. I don't have and sessions code on here. I tried adding it, it still doesn't work.
QUESTION: What am I missing?

[code]
  <?

$days_val=1;

$sec=$days_val*86400;



$curr_time=time();

$maxtime=$curr_time-$sec;



$sql = "select s1.* from sc_member s1,sc_member_images s2 where s1.scm_mem_id!=$social_mem_id and s1.scm_mem_id=s2.scm_mem_id and s2.sci_main=1 and s1.scm_regdate>$maxtime order by rand() limit 0,2";

$new_mem = $db->select_data($sql);

for ($i=0 ;$i< count($new_mem);$i++ )

{

?>

<?

$imgpath=$db->show_mem_image($new_mem[$i]['scm_mem_id'],$new_mem[0]['scm_gender'],1);

?>
  <a href="social_mem_profile.php?scm_mem_id=<?=$new_mem[$i][scm_mem_id]?>" class=border>

<img src="gd.php?pic=<?=$imgpath?>&w=100&h=75&enlarge=yes" width=100 height=75 border=1 class=border></a>

              <?

  }//for

  ?>
[/code]

Share this post


Link to post
Share on other sites
I think I solved it, I removed "s1.scm_mem_id!=$social_mem_id and" from the code.

Share this post


Link to post
Share on other sites

×

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.