PHP Scripts Development » PHP Classes Support Forum

HowTo display fotos using Easy PHP Upload

(25 posts)

Great offers not only for geeks!


  1. altoyes

    altoyes
    Member

    hi olaf and all
    thankyou for your time

    i am using the Easy PhP Upload script downloaded from here

    It works well for me here. thankyou. I have in the database all the images i have uploaded.

    i am using it in conjunction with the User Access Class downloaded from here

    HOW TO display the images on the webpage?

    Do you have a script made already?

    Posted 4 months ago #
  2. ?

    just show an image tag (you need to insert the image name after upload, check the db example)

    Posted 4 months ago #
  3. altoyes

    altoyes
    Member

    hi olaf

    thankyou for your reply

    just show an image tag (you need to insert the image name after upload, check the db example)

    yes i have that db example working here

    and all your examples here

    QUESTION:
    as you directed i have checked the db example.
    what does this mean?
    just show an image tag (you need to insert the image name after upload

    Posted 4 months ago #
    1. Upload the image with the example from the upload class
    2. Query the database for that image name
    3. Use that dynamic name in your image html
    Posted 4 months ago #
  4. altoyes

    altoyes
    Member

    1 i have uploaded the image.

    QUESTION
    2 How do i "Query the database for that image name"?
    Do i hardcode a query into the upload_db_example.php

    Posted 4 months ago #
  5. do you have any knwoledge in PHP or MySQL?

    check this PHP manual for the following functions:
    mysql_query()
    mysql_fetch_object() or mysql_fetch_assoc()

    Posted 4 months ago #
  6. altoyes

    altoyes
    Member

    yes, i do know how to query in mysql and php

    what does your output look like?
    might you have an example?

    this is what mine looks like - no image, just the name of the renamed file

    QUESTION
    how do i get the image to show instead of the renamed image file?

    Posted 4 months ago #
  7. ...maybe I think to simple:

    $res = mysql_query($sql);
    $obj = mysql_fetch_object($res);
    
    echo '<img src="yourFolder/'.$obj->uploaded_image.'" alt="" />';
    Posted 4 months ago #
  8. altoyes

    altoyes
    Member

    ok i will give it a go
    this looks tricky

    Posted 4 months ago #
  9. Quote from: altoyes
    "ok i will give it a go
    this looks tricky"

    beginners PHP knowledge ;)

    you should read a book or something, you need to know much more if your work with PHP classes

    Posted 4 months ago #

RSS feed for this topic

Reply »

You must log in to post.