I have a problem passing variables back and forth between my webpages ...
(1) On login.php I have ...
<?php
session_start();
if( $Logout == 1 ){
session_unregister( 'Username' );
session_unregister( 'Password' );
if( session_is_registered( 'Username' )){
print("
<SCRIPT LANGUAGE = 'Javascript'>
<!-- document.Login.submit(); -->
</SCRIPT>");
..........
}
else
{
print("
<SCRIPT LANGUAGE = 'Javascript'>
<!-- document.Login.Username.value = '';
document.Login.Password.value = '';
document.Login.Username.focus();-->
</SCRIPT>");
?>
(2) Once logged in, the index.php has ...
<?
$session=session_id();
if( $Username ){
<a href=next.php?Username=<?echo $session?>Next Page</a>
..........
(3) Then on next.php I have ...
<?
if( $Username ){
<a href=index.php?Username=<?echo $session?>Previous Page</a>
.........
When returning to first page from the next the session is lost, and the user is prompted to log in again.
How can I work around that?