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 : )
Php MySql dynamic table populate
Collapse
X
-
BeRtjh: a url makes no sense because all images are stored in the MySQL database (if I read the problem description correctly).
When 1 image is strictly tagged to 1 user, you can do the following. At the time the user uploads the image, I may assume he can do that after having been validated via a login. So you have the user's name available at upload time. You can then store the username in the same table same row as the image.
At display time you then select all images belonging to that (also validated logged-in) username using the following statement (var $username holds the validated user's name):Ronald :cool:Code:SELECT image_name FROM image_table WHERE userid='$userid';
Comment
Comment