Page 1 of 1

strange session accessing folders/files

Posted: Tue Oct 03, 2006 4:24 pm
by Obadiah
ok....say if i have a user whose name is bob and another named jane and when they go to the page after they log in their are links that based on their username will take them to a specific folder to pull up a personal file....can this be done? how? im assuming some wierd/cool lookin sql statement any ideas anyone?

p.s. no, this is not the same bob and jane from the enzyte commercial :lol:...maybe 8O

Posted: Tue Oct 03, 2006 10:04 pm
by akimm
Wel, lets first figure out what sort of traffic for this application are we expecting? If its only for a few people a text file validation of $_POST['name'] and 'pass' would be very sufficient. Not the best code, but for my log in needs it does the trick, however, use sessions in that, because, session validation will keep people from viewing others material.

Posted: Wed Oct 04, 2006 8:18 am
by Obadiah
sessions are what im in the process of learning and creating now....unfortunately my boss is wanting to use this project for our independent sales contractors and its like 20+ of them....what it needs to do is allow them access to a file that would reflect their sales for the month...what im thinking is that in addition to using sessions i would have to make links that would send a specific user to that folder based on his username....how can i do that?

Posted: Wed Oct 04, 2006 12:53 pm
by akimm
Do you want the users to be taken to a generic page, if they are indeed supposed to view the pages. Or is each person supposed to only be able to view their own?

Posted: Wed Oct 04, 2006 2:44 pm
by Obadiah
each person is supposed to be able to veiw their personal version of the same page....sort of like if you went to a online banking site...its the same layout but the info in it is yours...when you click on a link it will take you to a folder->page that has more of your personal information

Posted: Wed Oct 04, 2006 2:53 pm
by Luke
store each user's information in a database. When a user logs in, grab their user id and use it to look up their information and display it in a template.