Hey everyone!!
Im making a login system for a gaming club web site. Basically, header.php says that if there's reqi=1 in the URL bar and no session has been registered, display the login form.
The script also takes the current URL, checks to see if the password if correct and if it is, it diverts the user back to the page they came from.
EXAMPLE:
I am here
/stereo/default.php
When I click on "Login", the URL bar will read this....
/stereo/default.php?reqi=1
...the login form will be displayed.
But the problem im having is this...
say im here
/stereo/dept/index.php?DeptID=1
Now I decide to login, the URL bar will read....
/stereo/dept/index.php?DeptID=1?reqi=1
This won't display the login form, and I know why.
I need to make a script that will search the URL taken. If a '?' is found, echo $URL&reqi=1. Otherwise echo $URL?reqi=1.
Iv'e been looking for functions that will do this, and can't find any. Does anyone have an idea on how I could do this?
Your help will be much appriciated!!
Thank you,
Stereo