![]() |
|
|
|
Insert Tag Line HERE.....
|
PhpMyAdmin with Dreamweaver interface help!
I'm building a site for a friend who wants to have different users' logins to go to different specific pages. I've built a php page with a basic login where everyone who logs in will be directed to a certain page (providing their username/passwords agree with the database table), but he wants different user logons to go to different pages based on their login name. I'm using DW to build the pages, with a WAMP local test server using MyAdminPhp as the GUI interface to MySql to build the databases. DW has server behaviors and such built in, so would I need another table or a different server behavior, or different level of user authentication to get this accomplished? I think I just confused myself!
Thanks in Advance! Marc |
||
![]() |
|
The Unsettler
|
Well another table should do it.
Question is how many unique users and how many different pages? What is the initial criteria for determining which user/login goes to which page? Need a bit more info on the logic flow.
__________________
"I want my two dollars" "Goodbye and thanks for the fish" "Proud Member and Supporter of the YWL" "Brandon Won" |
||
![]() |
|
Insert Tag Line HERE.....
|
The number of unique users could change as his business grows, but right now, I think he said @ 10 or so. He wants to display a spreadsheet of their personal data related to his business, like money owed, or inspection dates and results, etc.. (roofing consultant) So user # 1 would need access to, lets say pages 3 different pages, User #2 might need only two pages for now, but maybe three later. They all would have specific names so I know which user matches to which pages. I dont see how another table would do it, as nowhere in the table structure does it direct you to a certain page. Tables simply allow/deny users to be checked against the database. If they are all using the same login page how can that differentiate users? Is that correct?
So, where can the login name do this? Think of an online banking site. Each user has access to their specific data. Thanks again.. Marc |
||
![]() |
|
Senior Member
Join Date: Jun 2000
Location: N. Phoenix AZ USA
Posts: 28,943
|
I know someone who can probably help you but he charges. I was having problems with my PHP bulletin board and he took care of it right away. Cost was not that much but its not free either.
__________________
2013 Jag XF, 2002 Dodge Ram 2500 Cummins (the workhorse), 1992 Jaguar XJ S-3 V-12 VDP (one of only 100 examples made), 1969 Jaguar XJ (been in the family since new), 1985 911 Targa backdated to 1973 RS specs with a 3.6 shoehorned in the back, 1959 Austin Healey Sprite (former SCCA H-Prod), 1995 BMW R1100RSL, 1971 & '72 BMW R75/5 "Toaster," Ural Tourist w/sidecar, 1949 Aeronca Sedan / QB |
||
![]() |
|
The Unsettler
|
OK,
Sounds like you are being asked to reinvent the wheel here. You can use a database to manage users/groups. Depending on what group you are in and what user you are determines the content you have access to. But I think your current path is a wild goose chase. This stuff already exists and does not take much to customize. What you are looking to build sounds somewhat like an affiliate or groupware system. My advice is get a copy of VM Ware, browse their virtual appliances and start with a turnkey solution that can be customized. Try Redmine? Open source,
__________________
"I want my two dollars" "Goodbye and thanks for the fish" "Proud Member and Supporter of the YWL" "Brandon Won" |
||
![]() |
|
Insert Tag Line HERE.....
|
Thanks I will look into those sites tomorrow. I really dont think it was going to be that hard. I have all the pages built, I just need a way to link the correct user to the correct pages. I have the 'registered users only' behaviors in place as well, so no one can jump to the specific URLs. I know I can set certain levels of authentication for certain users, but I think thats limited as to the number of users. I figure there has got to be a simple server behavior to do this. But it's late, I'm confused, and brain dead..!
Thanks again.. More later... |
||
![]() |
|
![]() |
The Unsettler
|
Quote:
You may think it is, your buddy may say it is, but I've done this stuff for people before. If this is not 100% self sufficient out of the gate I see resentment, aggravation and sleepless nights in your future.
__________________
"I want my two dollars" "Goodbye and thanks for the fish" "Proud Member and Supporter of the YWL" "Brandon Won" |
||
![]() |
|
Insert Tag Line HERE.....
|
Oh, Ive been down that road before too!!
Thanks! There is really cool stuff on those sites. Gonna take awhile to sort through it. |
||
![]() |
|
Registered
Join Date: Mar 2003
Posts: 10,346
|
I'd use one php page that generates the spreadsheet based on login. Everyone gets the same page, just different data in it based on login. Drop me a pm if you want.
__________________
“IN MY EXPERIENCE, SUSAN, WITHIN THEIR HEADS TOO MANY HUMANS SPEND A LOT OF TIME IN THE MIDDLE OF WARS THAT HAPPENED CENTURIES AGO.” |
||
![]() |
|
Insert Tag Line HERE.....
|
Well, that would work if all the data was going to represented the same way, but it isnt. Like one guys wants pictures of his roof, one guys wants inspection dates, one guys wants etc,. so basically all the pages they want would be different, so I would need to have each user be directed to a certain page. (like user 1 would only have access to pages - user1.html, user1a.html, user2 would only have access to pages- user2.html, user2a.html, and so on)
That make sense? |
||
![]() |
|
Registered
Join Date: Jan 2003
Location: IL
Posts: 1,638
|
Quote:
are the pages for the users static pages or are they generated dynamically? I'm sort of getting the impression they are static. If static, get the login name fron a db table of valid usernames and file names, check if valid, write a cookie of the username, and grab the associated static file name and redirect to that... write out a list of his other available pages for navigation as returned from the user table. run a check on that users page against the username cookie value to kick out if someone types in that url directly. other option would be to use an 'include' of the users static page from a file location beneath the root level or something like that, but you have to deal with the navigation somehow. interwebs coding is srs bsns Last edited by einreb; 05-20-2008 at 10:53 AM.. Reason: multiple pages |
||
![]() |
|
Insert Tag Line HERE.....
|
They should be all static. OK, so basically you are saying that I can match a username/password to certain files/pages in the same table? Right now I just have two fields in one table, username and password. So it seems that if I make a different table for each user to include three fields, username, password and available pages allowed, that would work? Or basically keeping the same table I have now, and then adding another table that matches usernames to pages allowed? I dont understand how one big table could hold the info, as opposed to making several different tables, but then again, the main login page can only point to one database table, correct?
I also understand that this my be way over my head! It just seems there must be a simple way to do this. And in saying that, i may have thought of another way, although not as pretty. Have a main login page for all of his clients, that would direct them to another secure login page that they could pick from a drop down menu or such. But that would be a last resort. Thanks again for the replies, I know I heading down the right track.! |
||
![]() |
|
![]() |
Registered
Join Date: Jun 2003
Location: Vancouver BC
Posts: 215
|
Quote:
From your login page, after you authenticate the user send them to the 'logged in' page which does something like: "SELECT AvailablePage FROM tPages WHERE userid='WhereverYou'reKeepingTheLoggedInUserid'". Then loop through those rows to make a menu of available pages for that particular user. That's what I'd do in php, anyway. I'm not sure about the Dreamweaver stuff. Hope that helps a bit. |
||
![]() |
|
The Unsettler
|
The problems here as I see it and what my suggestions for a tool like Redmine address are the pages themselves.
Unless I am not understanding this a) the number of users may increase over time. b) the content of the pages will change. So for each new user a new DB entry needs to be created and and appropriate page privileges granted. That is recurring work for someone, my guess it'll end up being rattlesnak. The pages of unique content will need to be maintained. Who is going to do that? What happens when new pages are added or pages are deleted? I don't think you are looking at the complete scope of the project. This is a groupware system. The volume of users and data may be small but that is irrelevant. The business process is what is important here. There are plenty of open source turnkey solutions.
__________________
"I want my two dollars" "Goodbye and thanks for the fish" "Proud Member and Supporter of the YWL" "Brandon Won" |
||
![]() |
|
Registered
Join Date: Jan 2003
Location: IL
Posts: 1,638
|
|||
![]() |
|
Registered
Join Date: Jun 2003
Location: Vancouver BC
Posts: 215
|
Yeah, if it looks like this is going to get out of hand then it might be worth your while to look into one of the CMS systems out there. All the login and content management is already mostly done. Some of them take some time to force into your mold, but in the end it might be time well spent.
Along with the ones previously mentioned have a look at drupal. I've been playing around with that one recently and it's a pretty good framework. |
||
![]() |
|
Insert Tag Line HERE.....
|
OK, im going to try the two table method first hopefully by this weekend. Ill let you guys know what happens.
And Stomach, I do understand the scope. the more he changes it, the more I charge him. Long story, but I'm builing it for free, (because i owe him) and when its done, he pays a monthly MX fee. Thanks for the replies... |
||
![]() |
|
The Unsettler
|
Well then I'd definitely set up a pre built solution. No one says you need to tell him what tech you are using and you don't need to give him any admin access whatsoever.
__________________
"I want my two dollars" "Goodbye and thanks for the fish" "Proud Member and Supporter of the YWL" "Brandon Won" |
||
![]() |
|
Insert Tag Line HERE.....
|
I like the way you think!
|
||
![]() |
|