Syphon Posted October 30, 2007 Share Posted October 30, 2007 What would be the best design for a first time run PHP page? I don't want to always be checking the database/file for a value. Seems too inefficient. My main problem would be trying to keep the user on the "first time run" page without them navigating to other pages which could be a potential issue. Checking for page existence seems like the cheapest solution to me, but would always have to be done for each page. Any ideas to a clean, simple and efficient solution? Thanks in advance. Quote Link to comment https://forums.phpfreaks.com/topic/75388-first-time-setup/ Share on other sites More sharing options...
trq Posted October 30, 2007 Share Posted October 30, 2007 What exactly do you mean 'first time run'? Quote Link to comment https://forums.phpfreaks.com/topic/75388-first-time-setup/#findComment-381471 Share on other sites More sharing options...
Syphon Posted October 30, 2007 Author Share Posted October 30, 2007 I have an application that requires data to exist within the database before it can be manipulated. So instead of customizing this data for each client, I figured a simple one-time form could ask for all the info (username, password, address, information about yourself) before allowing the client to use any part of the CMS system. Once a "master profile" has been established, they can login and create additional users, etc. Think of it when you purchase a new PC. They're packaged with a setup wizard to customize the computer on it's first run. I've thought about checking for users within the database on the login page. If there's no users then start the wizard, and if there are users then allow them to login. Since all the other pages require a valid user, the login page would be the only one that would "check" if the system has been initialized properly. Quote Link to comment https://forums.phpfreaks.com/topic/75388-first-time-setup/#findComment-381488 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.