Link to home
Start Free TrialLog in
Avatar of sydron
sydronFlag for Australia

asked on

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?
Avatar of sydron
sydron
Flag of Australia image

ASKER

I have figured the error out:

$_SESSION['chkHear'] =  $strHearAboutUs;

should be

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

I will close this question....
Avatar of jmar_click
jmar_click

I think this is a record for shortest post. God job sydron.
Avatar of sydron

ASKER

Hahaha, thanks for that jmar_click........I got it to work after examining it, so i posted it asap...

ASKER CERTIFIED SOLUTION
Avatar of kodiakbear
kodiakbear

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial