Session arrays

I'm trying to pass a SESSION array to another page

I know the code is wrong

I know the count for each variable.
 
This is what I have.

$SESSION['Right_Bldg']["SEQ"] = $ROW['SEQ'];

I'm passing the array count as a session variable, so I'm not worried about that.  The problem is on the first page.

Thanks
Glenn
breeze351Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Marco GasiFreelancerCommented:
Sorry, but I don't understand your problem.
The line:
$SESSION['Right_Bldg']["SEQ"] = $ROW['SEQ'];

Open in new window

is not necessarily wrong. But in the first page youi probably have to get the value $ROW['SEQ'] before to put it in the $_SESSION array. What $ROW['SEQ'] represents? Where it comes from?
We need more infos and more code to help you :-)
0
Ray PaseurCommented:
$SESSION != $_SESSION (check the name of the variable)

Here is how to use PHP sessions.  See the part captioned How to Write Your Code
http://www.experts-exchange.com/Web_Development/Web_Languages-Standards/PHP/A_11909-PHP-Sessions-Simpler-Than-You-May-Think.html
0
Ray PaseurCommented:
0
Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

Marco GasiFreelancerCommented:
Lol. Sometimes I don't see the baobab just in font of me!
0
Dave BaldwinFixer of ProblemsCommented:
And of course...  you must have session_start() at the top of Each and Every page in the session.  http://us1.php.net/manual/en/function.session-start.php
0
breeze351Author Commented:
My bad!!!!

I got most of it.  Idiot partner used $SESSION instead of $_SESSION in the first page!!!!

My problem is on the 2nd page now
I'm getting the following error with this code:

echo "lcount - ";
echo $_SESSION['Left_Bldg_Count'];

Notice: Undefined index: Left_Bldg_Count in /home/mrbreeze/public_html/chris/Walk_Map_Fred_PDF.php on line 10

I've displayed $_SESSION['Left_Bldg_Count'] on the 1st page.
0
Marco GasiFreelancerCommented:
Have you session_start() at the top of the page? Both pages?
0
breeze351Author Commented:
Yup.  Here's the inclusion that's at the top of every page:
<?php
session_start();
header("Cache-control: private");
error_reporting(E_ALL);
ini_set('display_errors', 1);
?>
0
Marco GasiFreelancerCommented:
Try to put this at the top of the page, after session_start():
echo "<pre>";
var_dump($_SESSION);
echo "</pre>";

Open in new window

This will print out the whole $_SESSION array so you can check if all expected values are present. var_dump is usually a good friend. :-)
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
breeze351Author Commented:
Thanks for the help
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Assembly

From novice to tech pro — start learning today.

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.