Php MySql dynamic table populate

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • larry777
    New Member
    • Jan 2007
    • 1

    #1

    Php MySql dynamic table populate

    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 : )
  • BeRtjh
    New Member
    • Jan 2007
    • 12

    #2
    its only a photo site? so nothing else? you might want to upload the images and save the url to the image in the mysql db.. ive got a script for this,..

    Hope to hear from you
    Greets, BeRtjh

    Comment

    • ronverdonk
      Recognized Expert Specialist
      • Jul 2006
      • 4259

      #3
      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):
      Code:
      SELECT image_name FROM image_table WHERE userid='$userid';
      Ronald :cool:

      Comment

      Working...