Re: $_SESSION array goes blind when inserting <img src=""> into it
- From: shimmyshack <matt.farey@xxxxxxxxx>
- Date: Fri, 29 Jun 2007 04:53:09 -0700
On Jun 29, 10:45 am, Joey33 <konrad...@xxxxxxxxx> wrote:
Hello to all people of good will,
On one page I insert into $_SESSION at 'mykey' a value:
<div onclick="parent.load_pic()" id="foto_0"><img alt="image" src=""/
</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 in $_SESSION array.
I tried addslashes(), htmlentities() but nothing works. To my surprise
it doesn't work in FF, in IE it's ok.
I also discovered that SRC="" attribute is the problem, when I skip it
or misspell it, everything works fine.
Any idea? Thanks in advance,
Joey_33
it works in both, session stuff is independent of browser!!
however since its html you need to view source to see. try this:
file1.php
<?php
session_start();
$_SESSION['mykey']='<div onclick="parent.load_pic()" id="foto_0"><img
alt="image" src=""></div>';
?>
file2.php
<?php
session_start();
var_dump($_SESSION);
?>
then view the source. It does work in firefox, to see that highligh
right click and view selection source. (cant just use view source
because the view source window doesnt send the cookie header)
I can confident say that it works, IE cannot be different to FF
because the data is sent to the browser as html, the only thing that
is exchanged between the server and the browser is a 32 char long
string of letters and numbers.
.
- References:
- Prev by Date: Re: resize image and memory limits
- Next by Date: Re: newbie
- Previous by thread: $_SESSION array goes blind when inserting <img src=""> into it
- Next by thread: resize image and memory limits
- Index(es):
Relevant Pages
|