Jump to content

Multiple scripts, one login?


magswod

Recommended Posts

Hello everyone :) I am a total newb to writing code. I have learned a few things by tearing apart script and seeing what makes it tick, but other than that - total idjit. However! I am in the process of putting together a website that will require ONE login for multiple scripts. They would be, for example, an ajax or php chat - forum - gallery - classifieds. I have considered using an already put together CMS or even a forum with multiple mods-plugins etc. In the end, I decided I'd like to try and write this from scratch.

 

Can I have all of the software point to one shared mysql database? shared table? I know that each software has their own mysql prefix, so I don't know how that would work.

 

Again, I don't know if this is possible, but any help would be greatly appreciated as my google searches have not been very fruitful :(

 

Thanks!!!

 

Mags

Link to comment
Share on other sites

Your question kind of changed direction midway. For the LOGIN process you would likely use one table. As part of the login process, once the user is successfully logged in, you would want to store something in the session information to identify that the user is logged in. Typically this just requires the user ID. Then, on every page that requires the user to be logged in you could add this at the top of the page:

if(!isset($_SESSION['user_id']))
{
   include("login.php");
   exit();
}

 

As for the actual applications/features, yes you would want multiple tables based upon the data to be stored.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.