I've been trying to reinvent the wheel again (hopefully not really), and
I've come up against a road block. I'm trying to write a multilayer user
authentication script - one that includes a class used as an authentication
object (maybe that's the wrong way to go). Anyway, I don't know a lot about
PHP, and so I found a typical example of how ASP can do it - first you do a
postback with the authentication credentials, then get a state back, and if
the state says the user is authenticated, then it redirects to the proper
page. The only thing I found about redirecting in PHP is using the
header(location) function, except that must be the first line in the script,
so that makes it difficult, because I can't include an external library or
anything, and I can't set a variable before I use it in that, like:

$page = "login.php"
header("Location: " . $page);

if(isAuthenticated())
{
  $page = "index.php";
  // Postback with new $page value
}

I also thought of conditionally writing a meta tag that redirects the user,
but that didn't seem to work either. Can anybody help me with this (I'm sure
SOMEbody can).

Thanks.

-- 
Nathan Lane
Home, http://www.nathandelane.com
Blog, http://nathandelane.blogspot.com

_______________________________________________

UPHPU mailing list
[email protected]
http://uphpu.org/mailman/listinfo/uphpu
IRC: #uphpu on irc.freenode.net

Reply via email to