Solved

PHP session issues

Posted on 2006-11-11
4
179 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
Comment Utility
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
Comment Utility
I think this is a record for shortest post. God job sydron.
0
 

Author Comment

by:sydron
Comment Utility
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
Comment Utility
Closed, 500 points refunded.
kb
Experts Exchange Moderator
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Introduction Many web sites contain image galleries; a common design for these galleries includes a page with a collection of thumbnail images.  You can click on each of the thumbnail images to see the larger version of the image.  This is easily i…
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

728 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now