Hi all,
This is my second post about the same problem, but now is more clear...
i'm using 'PhpSecurePages' to protect an Extranet.
To protect it, no problem.
The problem is that i want a user coming from another site go though the login screen, without filling a form again. Here's a brief explanaton of how it works.
There will be a link from this site to go to the extranet. This link will pass the login and password in the url, like
http://www.site.com/extranet/index.php?username=blabla&pssw=riblaribla
Passing the variables like this they expect to fill a form on the index.php, where the login form appear. This one is displayed form another file with the function: Code:
include($cfgProgDir . "interface.php")
To protect a page with this script, is sufficient paste a line of code:
<?PHP
$cfgProgDir = 'phpSecurePages/';
include($cfgProgDir . "secure.php");
?>
Here's the story;
the index.php (the protected page) includes 'secure.php'. This one contains configuration variables and some other settings. Again,this one, calls another file called 'checklogin.php'. If the datas are not 'true', the file 'interface.php' is displayed to sign in. But the url still have the same address as before.
Now... How to pass the variable through these pages?
If some of you see the full code, in the checklogin.php, there is a function at line 66 to check if login is necessary, and then at line 120 the conditions:
if (!$login) {
// no login available
include($cfgProgDir . "interface.php");
exit;
}
if (!$password) {
// no password available
$message = $strNoPassword;
include($cfgProgDir . "interface.php");
exit;
}
I'm trying to change the code here to pass the variables like:
if (!$password) {
// no password available
$message = $strNoPassword;
include($cfgProgDir . "interface.php?$passw=entered_login&$partn=entered_password");
exit;
}
Then in the url i have
http://www.site.com/extranet/index.php?passw=blabla&partn=blublu
Nothing happens. I get the login screen again.
Is the logic right? Is there another way i can achieve this?
I know is a bit long to explain, and to understand it requires to have the complete script, but who knows that among you there is at least one.......
Thanks in advance.😕