Jump to content


Photo

Session Issue


  • Please log in to reply
1 reply to this topic

#1 mcmuney

mcmuney
  • Members
  • PipPipPip
  • Advanced Member
  • 358 posts

Posted 21 August 2006 - 07:12 PM

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?

			   <?

				$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

			  ?>


#2 mcmuney

mcmuney
  • Members
  • PipPipPip
  • Advanced Member
  • 358 posts

Posted 21 August 2006 - 07:28 PM

I think I solved it, I removed "s1.scm_mem_id!=$social_mem_id and" from the code.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users