Solved

PHP session issues

Posted on 2006-11-11
4
205 Views
Last Modified: 2008-03-06
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?
0
Comment
Question by:sydron
  • 2
4 Comments
 

Author Comment

by:sydron
ID: 17924379
I have figured the error out:

$_SESSION['chkHear'] =  $strHearAboutUs;

should be

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

I will close this question....
0
 
LVL 3

Expert Comment

by:jmar_click
ID: 17932087
I think this is a record for shortest post. God job sydron.
0
 

Author Comment

by:sydron
ID: 17936385
Hahaha, thanks for that jmar_click........I got it to work after examining it, so i posted it asap...

0
 
LVL 1

Accepted Solution

by:
kodiakbear earned 0 total points
ID: 17992016
Closed, 500 points refunded.
kb
Experts Exchange Moderator
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Cpanel file manager 8 39
What does != "" mean in programming 8 76
PHP Query return divisible by 3 3 25
Showing multiple maps using PHP and Google Maps 8 19
Developers of all skill levels should learn to use current best practices when developing websites. However many developers, new and old, fall into the trap of using deprecated features because this is what so many tutorials and books tell them to u…
Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this.Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it is …
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

790 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question