Branden Wagner Posted July 27, 2006 Share Posted July 27, 2006 I am creating a customer management system for my company.and right now after searching for the customer the customerid (cid) is passed in the url..and then from there i just use $_GET['cid'] for each page that needs to pull the record.is there a better way to do this? should i be storing it in a session, right now all i am storing in a sessions is the user (who is logged on and making changes) information suchas username,access level,department,...should i be storing the requested customer account into a session to? right now i just keep the id in the url, and then every page does a new query select {whatever is needed } from {whatever was requested where id = $_GET['cid'];make sense? any help is greatly appreciated Quote Link to comment Share on other sites More sharing options...
corbin Posted July 27, 2006 Share Posted July 27, 2006 If you could post the login script this would be a lot easier to reply to. Also is there anything that keeps anyone from changing the cid in their address bar? Quote Link to comment Share on other sites More sharing options...
Branden Wagner Posted July 27, 2006 Author Share Posted July 27, 2006 well this is customer administration so only employees will be seeing it, so it doesnt matter if they change the cid up top or not, it will just pull the corresponding customer record.login script just pulls EMPLOYEE information on login not customeremployee info like:select id,fname,lname,department,accesslevel from employees where username = $username;login script really has nothing to do with the customer records...basically i want to know how i should be pulling/storing the customer record in a session or just via the url? which is better?as both will work, but as far as being efficient which is better?basically we do tech support and every call is logged and the reason for the call is logged, as well as their account information, and billing. Quote Link to comment Share on other sites More sharing options...
corbin Posted July 27, 2006 Share Posted July 27, 2006 Oh. Sorry misunderstood your initial post :D. I dont think it really matters whether you use a URL or sessions since its not accessed by the public... Quote Link to comment Share on other sites More sharing options...
Branden Wagner Posted August 3, 2006 Author Share Posted August 3, 2006 is one less server intensive? Quote Link to comment Share on other sites More sharing options...
onlyican Posted August 3, 2006 Share Posted August 3, 2006 put it this way, the difference is not noticable Quote Link to comment Share on other sites More sharing options...
Branden Wagner Posted August 3, 2006 Author Share Posted August 3, 2006 that works for me. ill just use sessions then cuz i find that to be easier. Quote Link to comment Share on other sites More sharing options...
nethnet Posted August 3, 2006 Share Posted August 3, 2006 It sounds like either way wouldn't really make much of a difference. I mean, I would always recommend sessions over passing in the URL, if not for security then for good coding practice. If you're really not concerned about anyone obtaining sensitive data then do whichever you feel better about. 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.