Forum Moderators: coopster
On one page I insert into $_SESSION at 'mykey' a value:
<div id="wrap_0" class="main6"><div onclick="parent.load_pic('foto_0', 'wrap_0')" id="foto_0"><img alt="image" src=""/></div><div class="sp1a">ccccccc</div></div>
It comes from a form and is assigned as usual:
$_SESSION['mykey']=$the_above_long_string
And on another page when I start the session and try to read the $_SESSION array the $_SESSION['mykey'] is empty.
All the other values set elsewhere are right there.
I tried addslashes(), htmlentities() but nothing works. To my surprise it doesn't work in FF, in IE it's ok.
Any idea? Thanks in advance,
Joey_33
Have you checked that the session var is being populated on the first page? Is the problem on that page rather than when the data is accessed on the next page? Try using this directly after you set the var:
echo '<pre>';
print_r($_SESSION);
echo '</pre>';
Are you using session_start() at the top of all your pages?
dc
The long string comes from an iframe on page 1 generated by JS after inserting in image in wysiwyg editor. If you feel like looking into the problem to avoid potential future problem let me know, I'll post codes and describe the problem in detail.
As for now, I went round this problem inserting src attribute at a later stage and it works.
Thanks for your interest and help DC!
Regards,
Joey_33