SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    SitePoint Enthusiast
    Join Date
    Dec 2005
    Posts
    88
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Graphics and phpmyadmin

    I am using phpMyadmin as the db for a website. I am having a problem trying to find out what file type to classify a graphic as. Currently I have graphics in the db that does not show up on the website.

    Many thanks

    Vonzie

  2. #2
    SitePoint Wizard triexa's Avatar
    Join Date
    Dec 2002
    Location
    Canada
    Posts
    2,476
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    phpMyAdmin is NOT the database... its a tool that allows you to access & manipulate your MySQL databases.

    As for graphic, you can store the binary data or you can just store the file name and have it sitting somewhere.

    I believe people use BLOB for the raw data of the graphic. If I'm not mistaken, you also need to run it through a PHP script which will send a header(image...) and echo the contents.

    Otherwise, just store the filename and <img src="images/uploaded/$image">
    AskItOnline.com - Need answers? Ask it online.
    Create powerful online surveys with ease in minutes!
    Sign up for your FREE account today!
    Follow us on Twitter

  3. #3
    SitePoint Enthusiast
    Join Date
    Dec 2005
    Posts
    88
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes I did get my facts somewhat wrong. I have been at this all day and now getting tired.

    Thank you for the pointers on the graphic though. I will give it a go.

    Vonzie

  4. #4
    SitePoint Enthusiast
    Join Date
    Dec 2005
    Posts
    88
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This is the code that I am using to try and get the graphic to show.

    echo "<td>"<img src='images/uploaded/$images' . stripslashes($row['show_graphic']). "'></td></tr>";

    What have I done wrong?

    Vonzie

  5. #5
    SitePoint Wizard cmuench's Avatar
    Join Date
    Jul 2005
    Location
    At my computer
    Posts
    2,251
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    We're gonna need more than that to help you.

  6. #6
    SitePoint Wizard silver trophy
    Join Date
    Mar 2006
    Posts
    6,132
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by vonz

    What have I done wrong?
    what, specifically, makes you think you have done something "wrong"?
    how did you arrive at this conclusion?
    be specific. vague posts arent good

  7. #7
    SitePoint Wizard triexa's Avatar
    Join Date
    Dec 2002
    Location
    Canada
    Posts
    2,476
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by vonz
    This is the code that I am using to try and get the graphic to show.

    echo "<td>"<img src='images/uploaded/$images' . stripslashes($row['show_graphic']). "'></td></tr>";

    What have I done wrong?

    Vonzie
    Why do you have a " after the <td>? What is $images? You need a " after $images, not a single quote. What is $row['show_graphic']?
    AskItOnline.com - Need answers? Ask it online.
    Create powerful online surveys with ease in minutes!
    Sign up for your FREE account today!
    Follow us on Twitter


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •