0

Hi,

Im using session variables and when passing from one page to another with a target="_top" the session variables are erased.
Is there anyway i can go around this problem ?
Any idea will be greatly appreciated.

Thank you

2
Contributors
3
Replies
4
Views
5 Years
Discussion Span
Last Post by yanwick
1

I just created a couple little test pages and the $_SESSION passed fine.

session.php

<?php
session_start();
$_SESSION['test']=TRUE;
var_dump($_SESSION);
?>
<br />
<a href="sessiontop.php" target="_TOP">sessiontop</a>

sessiontop.php

<?php
session_start();
var_dump($_SESSION);
0

Yes, ive tested your code too and it worked.
maybe it's because i'm using <form ... action="_top"> and a normal submit

when i use that it doesnt work but if i take the _top out, it works, and the session variables are preserved.

0

I already know what was wrong, it had nothing to do with the target=_top or not,
i had a bug because in javascript i had <script type="text/jscript">
instead of <script type="text/javascript">

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.