Login via URL with no login page

I want to allow users to login by using a parameter on the URL.

I would match the parameter to the user table and log them in automatically.

I realize this would be a security issue, but I can maintain the parameter value so I won’t be a problem.

So maybe the url is www.mysite.com/&parm=A6Em6 and that would login John Smith.

Again, I’ll take care of the security I just need to know how to grab the url, check against the user table, and log them in as that person if the parameter is found.

Thanks in advance,
Alan

I would use a ? after the .com. That means you are adding parameters.

In you SC code lines like the following add those values to variables for later use -

if (isset($_GET[‘Client’]))
{
$ClientName = htmlspecialchars($_GET[‘Client’]);
}
if (isset($_GET[‘Contact’]))
{
$Contact = htmlspecialchars($_GET[‘Contact’]);
}
if (isset($_GET[‘Add1’]))
{
$CustomerAddress1 = htmlspecialchars($_GET[‘Add1’]);
}

Hope that helps
Tony

How do I use the variable to skip the login page and login to my app?

And would i put this in a blank page and make the blank page be the default page?

I would suggest to do what you mention, to choose a blank page as the default page. Also check in this blank if the $_GET[‘Client’] has a value and redirect to your welcome page, if not, redirect to the traditional login.