RIRedinPA Posted November 25, 2008 Share Posted November 25, 2008 Hi I'm building a small production schedule type of site for internal use. Here is how it works. You search by either id, product, employee, etc. and the results are returned in a tabular format. Users can edit whether a project is completed or not. I also want it to double as the admin. The admins would be able to switch projects between designers, raise or lower priorities, delete, add, edit items. Nothing fancy. I don't need any complex security, just a simple username/password combo. No one is going to try and hack this up. So here were my thoughts: Initiate a session and set a variable - $isAdmin - to false. When validating the admin login form is it possible to use ajax to change the session variable to true? Is the php page called through AJAX linked in any way to the page where the javascript handler is? I'm kind of sketchy on sessions, are the variables global across pages until you move off the site? Any help would be appreciated, even completely new directions. Thanks Quote Link to comment https://forums.phpfreaks.com/topic/134227-login-ideas/ Share on other sites More sharing options...
JonnoTheDev Posted November 25, 2008 Share Posted November 25, 2008 Why do you need AJAX? Once you lookup the username/password for the submitted form via your database you can set session values based on the returned results. Quote Link to comment https://forums.phpfreaks.com/topic/134227-login-ideas/#findComment-698696 Share on other sites More sharing options...
revraz Posted November 25, 2008 Share Posted November 25, 2008 You really don't need AJAX for something like this, when somone logs in, just set a session and check if they are admin or not. If they are, just put the appropriate links on the page with IF statements. *Yep, agree with Neil Quote Link to comment https://forums.phpfreaks.com/topic/134227-login-ideas/#findComment-698706 Share on other sites More sharing options...
RIRedinPA Posted November 25, 2008 Author Share Posted November 25, 2008 Doh, trying to be more fancy than I need to be... Quote Link to comment https://forums.phpfreaks.com/topic/134227-login-ideas/#findComment-698718 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.