tysonrileyreznor Posted April 23, 2009 Share Posted April 23, 2009 Hi, I am multimedia student with only very beginner knowledge of php. I am creating a wedding photographer site which has a client login page for clients to view their proofs and order by email. I have created the mysql database but am unsure how to tackle the php for this - after the client logs in, having their specific photos pulled from the database and displayed to view and order. My prof told me that I can have photos from all clients in one folder and have php rename them to that client and then retrieve the correct photos based on the id...but I have no clue on how to actually do this. If anyone is able to point me in the right direction it would be greatly appreciated!!! Quote Link to comment https://forums.phpfreaks.com/topic/155397-php-help-client-proof-gallery/ Share on other sites More sharing options...
mikesta707 Posted April 23, 2009 Share Posted April 23, 2009 what i would do in this case (which btw is NOT what your professor said to do) Is make a table in your database with all the photos information, and a table with all the client information. on the photo table, I would have a column with the clients username, or id or something like that to associate a photo with a client. then when they want to view their photos you do something like <? $user = $_SESSION['Username'];//or however you want to get the username $query = mysql_query("SELECT * FROM photo WHERE userid='$user'"); ... //process query etc. ?> I hope that helps Quote Link to comment https://forums.phpfreaks.com/topic/155397-php-help-client-proof-gallery/#findComment-817662 Share on other sites More sharing options...
tysonrileyreznor Posted April 23, 2009 Author Share Posted April 23, 2009 Thanks for the reply! I'm still a bit confused as coding is really not my thing, but I need to get this done. I have a tbl_clients that includes the fields: id, fname, lname,date,details,thumb,image,clientuser,clientpass So you are saying the thumb and image fields should be in their own table? (Would I still be keeping all images in one folder or seperate folders per client...does it matter?) The code you provided that would be included in my login.php script? Quote Link to comment https://forums.phpfreaks.com/topic/155397-php-help-client-proof-gallery/#findComment-817681 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.