VALUABLE LESSON: using sessions and include
| From: | jtjohnston | Date: | Wed, 14 Nov 2001 08:48:19 +0000 |
| Subject: | VALUABLE LESSON: using sessions and include | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-74563@lists.php.net to get a copy of this message | ||
Thanks Dav,
You caught me while I was debugging. But I learned a valuable lesson! I indeed
did not name my session_name correctly. IN FACT ... I did not name it AT ALL in
display_image.php. There lay the problem. I needed to declare both:
session_name("ESLpostcard");
session_start();
at the beginning of display_image.php AND postcard.php for the data to
re-transmit itself.
I was running both php files without session_name and session_start. The docs
just don't make that clear enough that you need to re-include session_name.
Duh, uh, ....... the session ID stayed the same, so I figured the data was
getting through even if I didn't see it. Indeed, postcard.php was receiving the
data - we can see that in the form - but was not transmitting the data as well,
only if I included display_image.php
>
> http://www.collegesherbrooke.qc.ca/languesmodernes/postcard/index.html
>
> http://www.collegesherbrooke.qc.ca/languesmodernes/postcard/index.html.phps
>
> http://www.collegesherbrooke.qc.ca/languesmodernes/postcard/postcard.php
>
> http://www.collegesherbrooke.qc.ca/languesmodernes/postcard/postcard.phps
>
> http://www.collegesherbrooke.qc.ca/languesmodernes/postcard/display_image.php
>
> http://www.collegesherbrooke.qc.ca/languesmodernes/postcard/display_image.phps