New To Mac-Forums?

Welcome to our community! Join the discussion today by registering your FREE account. If you have any problems with the registration process, please contact us!

Get your questions answered by community gurus Advice and insight from world-class Apple enthusiasts Exclusive access to members-only contests, giveaways and deals

Join today!

 
Start a Discussion
 

Mac-Forums Brief

Subscribe to Mac-Forums Brief to receive special offers from Mac-Forums partners and sponsors

Join the conversation RSS
Web Design and Hosting Creating sites, scripting, and hosting discussions.

A little help with PHP/MySQL


Post Reply New Thread Subscribe

 
Thread Tools
blinkdude182

 
blinkdude182's Avatar
 
Member Since: Mar 29, 2007
Location: Machala, Ecuador
Posts: 80
blinkdude182 is on a distinguished road
Mac Specs: Macbook Pro, Intel Core 2 Duo 2.4 Ghz, 2GB RAM

blinkdude182 is offline
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!
QUOTE Thanks
Lewwy

 
Lewwy's Avatar
 
Member Since: May 21, 2007
Posts: 198
Lewwy is on a distinguished road
Mac Specs: 15" Macbook Pro, 2.16gz, 2gb RAM || 20" iMac, 2.4gz, 2gb RAM

Lewwy is offline
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.
QUOTE Thanks
Murlyn

 
Murlyn's Avatar
 
Member Since: Jun 11, 2003
Location: Mount Vernon, WA
Posts: 4,909
Murlyn is a name known to allMurlyn is a name known to allMurlyn is a name known to allMurlyn is a name known to allMurlyn is a name known to allMurlyn is a name known to allMurlyn is a name known to all
Mac Specs: MacBook Pro 2.6 GHz Core 2 Duo 4GB RAM OS 10.5.2

Murlyn is offline
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.
QUOTE Thanks
Lewwy

 
Lewwy's Avatar
 
Member Since: May 21, 2007
Posts: 198
Lewwy is on a distinguished road
Mac Specs: 15" Macbook Pro, 2.16gz, 2gb RAM || 20" iMac, 2.4gz, 2gb RAM

Lewwy is offline
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.
QUOTE Thanks
blinkdude182

 
blinkdude182's Avatar
 
Member Since: Mar 29, 2007
Location: Machala, Ecuador
Posts: 80
blinkdude182 is on a distinguished road
Mac Specs: Macbook Pro, Intel Core 2 Duo 2.4 Ghz, 2GB RAM

blinkdude182 is offline
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!
QUOTE Thanks

Post Reply New Thread Subscribe


« accidentally deleted my domain | Is there any program what's nearly to macromedia flash? »
Thread Tools

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread
Thread Starter
Forum
Replies
Last Post
Testing PHP/MySQL on local machine ? Liam OS X - Apps and Games 3 07-29-2007 07:18 AM
PHP/mySQL difficulties on Mac OS X.... The Annoyed Man Web Design and Hosting 6 11-02-2005 02:42 PM
mac osx server. (php/mysql) design2 Web Design and Hosting 5 07-30-2005 04:02 AM
Help with b2evolution php/mySQL indykid Web Design and Hosting 0 06-07-2005 03:49 PM
Learning PHP/MySQL dziner Web Design and Hosting 2 03-19-2004 05:58 PM

All times are GMT -4. The time now is 02:52 AM.

Powered by vBulletin
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
X

Welcome to Mac-Forums.com

Create your username to jump into the discussion!

New members like you have made this community the ultimate source for your Mac since 2003!


(4 digit year)

Already a member?