magswod Posted February 22, 2013 Share Posted February 22, 2013 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 Quote Link to comment Share on other sites More sharing options...
AyKay47 Posted February 22, 2013 Share Posted February 22, 2013 Yes they can point to a single database, however you will not want to use a single table for this. Look into studying "database normalization" to get you going on that topic. Quote Link to comment Share on other sites More sharing options...
Psycho Posted February 22, 2013 Share Posted February 22, 2013 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. Quote Link to comment Share on other sites More sharing options...
magswod Posted February 23, 2013 Author Share Posted February 23, 2013 Thank you both for the quick replies! I'll tinker with it a bit more. Do you have any suggestions on where I can get more info on database normalization? Again, thank you!! Quote Link to comment Share on other sites More sharing options...
AyKay47 Posted February 23, 2013 Share Posted February 23, 2013 Simply googling "Database Normalization" yields many helpful resources. 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.