I am trying to create a login form for users. I'm not looking for something that will be of the highest security. Basically, if User1 wants to login, I would want User1 to get redirected to User1's own directory. I haven't tried putting code together, because I'm having problems finding what I should use here. But, I can type out what I mean, it may make it easier to gain some assistance.
if (user == 'user1' && pass == 'pass1'); openurl ("./user1/index.php'); elseif (user == 'user2' && pass == 'pass2'); openurl ("./user2/index.php'); else openurl ("loginfailed.php');
Is there even a string that would call a URL to open, such as "openurl ("./user1/index.php');"?
Also, is there a string that I could include on all pages of a said directory, that would check to see if the user is logged in, if not direct them to the login page?
I see a lot about this, but it's worded in ways I am having problems understanding how to associate it in my own page.