pr3da70r Posted July 12, 2008 Share Posted July 12, 2008 Hi everyone! I'm new here, and also new to php. Loving it so far though! Basically I have 3 different scripts on my site currently, and each has a separate database, and a separate login.php file, set up in a different way. Now this is probably a long shot but, here's what I was thinking. Let's say each script has its login.php named as login1.php, login2.php, and login3.php respectively. Can I set each login.php so that if the user successfully logs in using one, it calls the other two phps as well, thus logging the user in to each individual part of the site? Ofcourse for this the users will have to have the same username and password in all 3 databases, which I can easily enforce by integrating the registration function similarly. So what I'm trying to do is, something like this... login1.php would have.. // run sql queries to make sure the username and password is correct ........ // if username is correct, making sure login2 and login3 don't md5 the password again, and // also making sure username and password are stored in the proper variables. log in to the first section of the site include("/section2/login2.php"); include("/section3/login3.php"); // if username is incorrect just give the error as you would on an unsuccessful login. Would this work? Why or why not? Any other suggestions on how this could easily be implemented? If it helps any, SMF is one of the 3 sections I'm trying to integrate Thanks everyone! This is really confusing me, and it's very crucial to my site, ofcourse, since it's a total pain having to log in 3 different times to be able to use the different sections.. Truly will appreciate the help -Pred Quote Link to comment Share on other sites More sharing options...
pr3da70r Posted July 12, 2008 Author Share Posted July 12, 2008 Anyone? Even a little nudge to where I could find the answer? Looking for a good way to integrate the login of multiple php scripts.. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.