SitePoint Sponsor

User Tag List

Page 3 of 3 FirstFirst 123
Results 51 to 55 of 55

Thread: Display as picture in PHP from MySQL?

  1. #51
    Grüße aus'm Pott
    SitePoint Award Recipient Pullo's Avatar
    Join Date
    Jun 2007
    Location
    Germany
    Posts
    2,454
    Mentioned
    39 Post(s)
    Tagged
    1 Thread(s)
    Hi,

    Not sure if I understand.
    You want to store a URL in your database table and output it on your page?
    That's definitely possible.
    How well do you know your JavaScript from your jQuery?
    Check out SitePoint's latest JavaScript challenge


    My blog

  2. #52
    SitePoint Enthusiast
    Join Date
    Oct 2012
    Posts
    40
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi pullo.

    thanks, I think I've solved this issue. please look at it and see if it is correct?
    <span class="ratings">Rating</span>
    <img src="/img/rating'.$row['food'].'.png"/>

    This is what I get, and in my /img/ file I have .png files from rating1.png to rating5.png, and the row[food] from 1-5 will select the respective pictures and display them.

  3. #53
    Grüße aus'm Pott
    SitePoint Award Recipient Pullo's Avatar
    Join Date
    Jun 2007
    Location
    Germany
    Posts
    2,454
    Mentioned
    39 Post(s)
    Tagged
    1 Thread(s)
    Well done!
    That looks great to me.
    How well do you know your JavaScript from your jQuery?
    Check out SitePoint's latest JavaScript challenge


    My blog

  4. #54
    SitePoint Enthusiast
    Join Date
    Oct 2012
    Posts
    40
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thank you Pullo, so much for aiding me in the process of creating my pages. Your help is greatly appreciated - if it wasn't for you, I don't know if I'll be able to finish it in time Thanks so much for your friendly help!

    Do you mind if I use your name to reference you in my journal?

  5. #55
    Grüße aus'm Pott
    SitePoint Award Recipient Pullo's Avatar
    Join Date
    Jun 2007
    Location
    Germany
    Posts
    2,454
    Mentioned
    39 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by luxuri View Post
    Do you mind if I use your name to reference you in my journal?
    No, that's cool.
    Fame at last!
    How well do you know your JavaScript from your jQuery?
    Check out SitePoint's latest JavaScript challenge


    My blog

Tags for this Thread

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
  •