Jump to content

Just ANOTHER login post


ph-q

Recommended Posts

I know theres a gazillion login page questions. I can't seem to get a head start on this one. I'm not looking for a whole script written (would appreciate it) but looking more for what I need to include on this. I'm a n00b when it comes to php. I can hack an already made script but im not too good on syntax to start writing my own stuff. What I need is a login script that will authenticate through mySQL once authenticated depending on the user it will take that user to the appropriate users public_html directory.

I would appriciate any help and push in the right direction. Hopefully someone could post a reply and point me in the right direction.

 

i.e. http://mysite.com

username <username>

password <password>

 

redirect to http://mysite.com/~<username>

 

Thanks

Link to comment
https://forums.phpfreaks.com/topic/48465-just-another-login-post/
Share on other sites

So, you create a FORM with a text box and password and a submit button.

 

Then post this to a page, say index.php.

 

Here, check the details and if they are allowed to log in, do a 302 redirect (use header() ) to the correct url:

 

header('Location: ./~'. $user_name);

 

make sense?

 

1: create loging page

2: confirm details, reject hackers. Test this page a few times.

3: If ok redirect, else print error page.

 

Now check out sessions.

 

monk.e.boy

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.