I have not tested this but it should work...

Adam

<?php

// this goes on the firt page
if (!$admin){
        Header("Location: logon.php?ref=" . $SCRIPT_NAME . ");
}

?>




this goes in the form area on login.php
<input type="hidden" name="ref" value="<?= $ref ?>">




<?php

// this goes on the login page after logged in and all is OK

Header("Location: $ref");

?>


-----Original Message-----
From: its me [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 11, 2002 4:27 PM
To: [EMAIL PROTECTED]
Subject: login


there is a page that when user go to need to be looged in,so it automaticaly
go back with him to loggin page but after login i want him to go back to the
page he was in.....how?
using history()? and how.
thanks guys


Rehab M.Shouman

------------------------------------------------------------
------------------------------------------------------------


---------------------------------------------------------------------
Express yourself with a super cool email address from BigMailBox.com.
Hundreds of choices. It's free!
http://www.bigmailbox.com
---------------------------------------------------------------------


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to