Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

PHP session issues

Posted on 2006-11-11
4
Medium Priority
?
224 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Tech or Treat! - Giveaway

Submit an article about your scariest tech experience—and the solution—and you’ll be automatically entered to win one of 4 fantastic tech gadgets.

Question has a verified solution.

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

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 i…
This article discusses four methods for overlaying images in a container on a web page
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.
Suggested Courses

618 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