strange session accessing folders/files

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
Obadiah
Forum Regular
Posts: 580
Joined: Mon Jul 31, 2006 9:13 am
Location: Ashland, KY
Contact:

strange session accessing folders/files

Post 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
User avatar
akimm
Forum Contributor
Posts: 460
Joined: Thu Apr 27, 2006 10:50 am
Location: Ypsilanti Michigan, formally Clipsburgh

Post 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.
User avatar
Obadiah
Forum Regular
Posts: 580
Joined: Mon Jul 31, 2006 9:13 am
Location: Ashland, KY
Contact:

Post 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?
User avatar
akimm
Forum Contributor
Posts: 460
Joined: Thu Apr 27, 2006 10:50 am
Location: Ypsilanti Michigan, formally Clipsburgh

Post 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?
User avatar
Obadiah
Forum Regular
Posts: 580
Joined: Mon Jul 31, 2006 9:13 am
Location: Ashland, KY
Contact:

Post 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
User avatar
Luke
The Ninja Space Mod
Posts: 6424
Joined: Fri Aug 05, 2005 1:53 pm
Location: Paradise, CA

Post 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.
Post Reply