OK, guys, here's what I have.
I'm writing a login script. Everything that the script does, is done within itself. If no session variables are registered, it loads the login form. If the username and password from the login form has been set (i.e. submitted), it skips loading the login form and checks the username and password against the database; if everything checks out there, it registers two session variables (username and ranking). If the session variables are registered, it displays a "You have been logged in as $username" message, then does some other stuff.
Now I know I can just do this by passing the session parameters to another script if everything works out, but I don't really want to do that. I want the script to re-execute itself once the session variables have been registered. The thing is that I don't know how to do this.
So I have two questions.
1) How do I make a script run another script? For example, if I did want to pass some parameters to another script if everything worked out, and then run that script, how could I do this? I certainly don't want to load a page saying "Click this to load another script".
2) How do I make a script run itself?
-Nij