Hi all,
I have made a login script which jumps about using the header function, and ends up logging you in and redirecting to your original page. Now htis all works fine but in the process of jumping between pages I lose the ?variable=xxxx. Is there anyway to stop this, my code is as follows:
<?php
$check_login=mysql_query("SELECT COUNT(*) AS is_member FROM members WHERE username='".$_SESSION['username']."' AND password='".$_SESSION['password']."'");
$row=mysql_fetch_assoc($check_login);
if ( $row['is_member'] == 1 ) {$logged_in=1;} else {$logged_in=0; header("Refresh: 0; URL=../login.php?referer=".$HTTP_SERVER_VARS['PHP_SELF'].""); die(); }
?>
The original check where it gets the url info and check the database.
<form name="form1" method="post" action="includes/login_check2.php?<?php if ( $_GET['referer'] == NULL ) { print "../members.php"; } else { echo($_GET['referer']); } ?>">
This is where I lose my url variables, any idea why im losing them because they are in the original url thye just get lost somewhere when trying to pass them over.
Regards,
Jack.