mcmuney Posted August 21, 2006 Share Posted August 21, 2006 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] Link to comment https://forums.phpfreaks.com/topic/18225-session-issue/ Share on other sites More sharing options...
mcmuney Posted August 21, 2006 Author Share Posted August 21, 2006 I think I solved it, I removed "s1.scm_mem_id!=$social_mem_id and" from the code. Link to comment https://forums.phpfreaks.com/topic/18225-session-issue/#findComment-78239 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.