larry777 Posted January 18, 2007 Share Posted January 18, 2007 Greetings, I'm a Php newbie and am developing a photo album site and have the basic framework in place with user registration, login, and then a page that you can upload images to MySql and those images are displayed below. What I am trying to do is create a system whereby when a user logs in they are sent to a page that shows a table with THEIR images that they have uploaded.. kinda creating the users very own page. I'm sure this is possible but am stumped. Please help if you can : ) Link to comment https://forums.phpfreaks.com/topic/34712-php-mysql-dynamic-table-populate/ Share on other sites More sharing options...
sanguinious Posted January 18, 2007 Share Posted January 18, 2007 Hey,What I would do is have a db table which contains the user id against the pic url, say user_img:[table][tr][td][b]user_id[/b][/td][td]|[/td][td][b]url[/b][/td][/tr][tr][td]1234[/td][td]|[/td][td]img/picture.gif[/td][/tr][/table]so when they log in you can query the table:[code]select url from user_imgwhere user_id = [current_user][/code]then for each of the returned rows output the url within the img tag:[code]<img src="<?=$url_variable?>">[/code]Hope this helps,Angus. Link to comment https://forums.phpfreaks.com/topic/34712-php-mysql-dynamic-table-populate/#findComment-163631 Share on other sites More sharing options...
larry777 Posted January 19, 2007 Author Share Posted January 19, 2007 Hey Angus, thanks for the response, am going to try it out. wish me luck!Cheers Link to comment https://forums.phpfreaks.com/topic/34712-php-mysql-dynamic-table-populate/#findComment-164369 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.