PHP session issues

Hi,

I have this code:

   $chkHear= $_REQUEST['chkHear'];                          
   $strHearAboutUs="";                                
   $count=count($chkHear);                                  
   for($i=0;$i<$count;$i++){$strHearAboutUs="$strHearAboutUs$chkHear[$i], ";}  
    $_SESSION['chkHear'] =  $strHearAboutUs;

then later on i tried to read the $_SESSION['chkHear']  and simply echo the $_SESSION['chkHear'] BUT I GET nothing being displayed..

Any ideas?
sydronAsked:
Who is Participating?
 
kodiakbearCommented:
Closed, 500 points refunded.
kb
Experts Exchange Moderator
0
 
sydronAuthor Commented:
I have figured the error out:

$_SESSION['chkHear'] =  $strHearAboutUs;

should be

$_SESSION['chkHear'] =  "$strHearAboutUs";

I will close this question....
0
 
jmar_clickCommented:
I think this is a record for shortest post. God job sydron.
0
 
sydronAuthor Commented:
Hahaha, thanks for that jmar_click........I got it to work after examining it, so i posted it asap...

0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.