Results 1 to 5 of 5
  1. #1
    A little help with PHP/MySQL
    blinkdude182's Avatar
    Member Since
    Mar 29, 2007
    Location
    Machala, Ecuador
    Posts
    80
    Specs:
    Macbook Pro, Intel Core 2 Duo 2.4 Ghz, 2GB RAM
    A little help with PHP/MySQL
    Hey there guys!
    I'm building up a site for a friend, he's a lawyer, and he just needs basic info such as street address, staff, some pictures, about us, contact us, etc...you know, the basic, static stuff, and I got no problem there (I'm doing this with Dreamweaver CS3).
    However, here comes the tricky part:
    He wants his clients to be able to log in with a username/password and check their cases on the website, which means I would need to create a different unique page for each user.

    So, being a complete newbie with PHP and MySQL, I successfully followed this tutorial on how to create a login page for users. Everything was understood. Everything went fine. That's covered.

    Now, all I need, is to know how to redirect each user to his own page, where he'll be able to find his documents, cases, pictures, or whatever my friend asks me to upload.

    For example, Mr. Jones wants to check how his car insurance case is going, so he would go to the website, login, and he would be redirected to a page that only HE can see. This page will contain pictures of his crashed car, text files, or whatever I upload...

    I hope you can understand what I'm trying to do It's like when you go to your profile page here in the forum.

    I'm sure it's not too hard for experienced users to accomplish something like this. If you could tell me how to achieve this I'd be really grateful!

    Thanks a lot!

  2. #2
    A little help with PHP/MySQL
    Lewwy's Avatar
    Member Since
    May 21, 2007
    Posts
    198
    Specs:
    15" Macbook Pro, 2.16gz, 2gb RAM || 20" iMac, 2.4gz, 2gb RAM
    I havent looked at the tutorial you followed, but it might be an idea to look into sessions if you havent already.

    The way I would do it (and I am by no means an expert) is use the login script youve created and assign the user a session, then set up a unique page for each client e.g /client/john-jones.php and have this page check that the user has the 'session' assigned.. If not, ask them to login.

    Ive made it sound easier than it really is.. I hope your getting paid, or some legal advice should you ever need it, as this isnt an easy task.

    If you need any help, fire me an email lewis [at] hilldesigns.co.uk or add me on MSN lewwy [at] hotmail [dot] co [dot] uk.

    Cheers,
    Lewis.

  3. #3
    A little help with PHP/MySQL
    Murlyn's Avatar
    Member Since
    Jun 11, 2003
    Location
    Mount Vernon, WA
    Posts
    4,915
    Specs:
    MacBook Pro 2.6 GHz Core 2 Duo 4GB RAM OS 10.5.2
    I am a PHP and MySQL developer and I have to advise you not to do this job. You're looking at some serious legal ramifications, unless you can have your friend write up a waiver that he will sign which removes you from all liability in case his clients' stuff is stolen. I could see you learning on some other sites that it's not a privacy issue if people hack it, but this is a potential lawsuit.

    Now if you do not take my advise, then you need to do some serious reading on PHP security methods. I would also put all the client info into the database, make sure you have two specific MySQL logins, one for the admin you should create your friend and then one that only has read only and write permissions for the login and the client data. Then your friend can enter the data through the admin, and then when the client logs in, you can take their user id and grab all their info from the database.

    This is a lot more involved than this, but again.. Im going to have to recommend you learn with something a lot easier and with less liability then this job.

  4. #4
    A little help with PHP/MySQL
    Lewwy's Avatar
    Member Since
    May 21, 2007
    Posts
    198
    Specs:
    15" Macbook Pro, 2.16gz, 2gb RAM || 20" iMac, 2.4gz, 2gb RAM
    Ah, fair play Murlyn.. I didnt think that far into it, glad you did though.
    What with it being legal data, I agree.

    Furthermore I took a look at the tutorial you followed, and it seems that dreamweaver did all the work for you in the first place, so it wouldnt make sense for you to learn about sessions having essentially skipped the first bit, kind of like running before you can walk.

    Good luck whatever you do.

  5. #5
    A little help with PHP/MySQL
    blinkdude182's Avatar
    Member Since
    Mar 29, 2007
    Location
    Machala, Ecuador
    Posts
    80
    Specs:
    Macbook Pro, Intel Core 2 Duo 2.4 Ghz, 2GB RAM
    Thanks a lot to both of you guys. In fact, I might have said no If I didn't know what I was getting into, but my friend actually works only with routine stuff that no one would really pay attention to...I mean a hacker would not be interested in reading this kind of stuff. Although it is legal information, it is not really classified...he just wants to give his clients a bit of a better service.
    I warned him I didn't know much about advanced web programming and security, but he said it didn't matter since he has a handful of clients with routine cases that no one would take advantage off even if they were published on a newspaper

    So, getting back on track, it would seem I have to do some reading and learn about sessions from the start. I'll walk before running and come back here and bother you with some other questions once I know a little more.

    Thanks a lot really -- you'll hear more about me and php soon I hope.

    Props!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. PHP and MySQL
    By conor in forum OS X - Operating System
    Replies: 5
    Last Post: 06-11-2009, 07:44 PM
  2. PHP mysql
    By richardmojo in forum Web Design and Hosting
    Replies: 2
    Last Post: 05-09-2005, 10:05 PM
  3. All in 1; php/apache/mysql ?
    By gab1982 in forum Running Windows (or anything else) on your Mac
    Replies: 5
    Last Post: 08-31-2004, 03:41 PM
  4. PHP+MySQL Help.
    By design2 in forum Web Design and Hosting
    Replies: 3
    Last Post: 08-07-2004, 06:22 PM
  5. Apache + PHP + MySQL
    By Emrys in forum OS X - Development and Darwin
    Replies: 2
    Last Post: 11-14-2003, 01:30 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •