Closed Thread
Page 10 of 22 FirstFirst ... 8910111220 ... LastLast
Results 91 to 100 of 214

Thread: Tutorial: Storing Images in MySQL with PHP / Part II / Display your images

  1. #91
    hardinera's Avatar
    hardinera is offline Learning Programmer
    Join Date
    Jul 2009
    Posts
    42
    Rep Power
    0

    Re: Tutorial: Storing Images in MySQL with PHP / Part II / Display your images

    jan,

    thanks for your help

    silly me forgot to set the query first for the $id lol

    <?php echo("<img src=\"show.php?id=$id\" />"); ?>
    this code surely helped me... thanks a lot

    >.> QUESTION AGAIN

    what if there is no image on the selected row?

    i cant print *no selected image*

    do i have to use if else statement in printing?
    Last edited by hardinera; 07-30-2009 at 07:02 PM.

  2. CODECALL Circuit advertisement
    Join Date
    Always
    Posts
    Many

     
  3. #92
    Jan
    Jan is offline Newbie
    Join Date
    Jul 2009
    Posts
    7
    Rep Power
    0

    Re: Tutorial: Storing Images in MySQL with PHP / Part II / Display your images

    I'd check if your image column is empty with: if(!empty($row['image'])) before callling Jaan's image download script. If it's empty you can show a default image.

  4. #93
    Join Date
    Sep 2007
    Location
    Karlstad, Sweden
    Posts
    3,082
    Blog Entries
    7
    Rep Power
    42

    Re: Tutorial: Storing Images in MySQL with PHP / Part II / Display your images

    You can always, in your show.php state an id that is going to be shown if the given ID does not exist. Anything could be done.
    __________________________________________
    I study Information Systems at Karlstad University when I'm not on CodeCall

  5. #94
    kadalpenguk is offline Newbie
    Join Date
    Aug 2009
    Posts
    1
    Rep Power
    0

    Re: Tutorial: Storing Images in MySQL with PHP / Part II / Display your images

    tq, i'll try

  6. #95
    ssSuave is offline Newbie
    Join Date
    Jan 2009
    Posts
    12
    Rep Power
    0

    Re: Tutorial: Storing Images in MySQL with PHP / Part II / Display your images

    Hi thanks again for the tutorial.

    So my upload form is working perfectly on Safari and FF but it fails to work on IE. The image just does not get uploaded.
    It is really annoying and I cannot figure it out. I have tried searching for an answer on google but couldn't find anything. I know i am not the only one since there were other people who had the same problem but I couldn't find any solutions. I read something about how instead of "enctype" there should be "encoding" for IE but i don't know how to integrate it. I would Really appreciate your help.

    Thank you in advance

  7. #96
    phillw's Avatar
    phillw is offline Learning Programmer
    Join Date
    Aug 2009
    Location
    Northwest England (UK)
    Posts
    82
    Blog Entries
    1
    Rep Power
    0

    Thumbs up Re: Tutorial: Storing Images in MySQL with PHP / Part II / Display your images

    Thanks for the tutorial - between you and Jordan - exactly what I've been trawling round looking for.

    Regards,

    Phill.

  8. #97
    Jordan Guest

    Re: Tutorial: Storing Images in MySQL with PHP / Part II / Display your images

    You're welcome (from me for Part I), lol.

  9. #98
    phillw's Avatar
    phillw is offline Learning Programmer
    Join Date
    Aug 2009
    Location
    Northwest England (UK)
    Posts
    82
    Blog Entries
    1
    Rep Power
    0

    Re: Tutorial: Storing Images in MySQL with PHP / Part II / Display your images

    He he - I [I]thought[I] this was going all too well

    Refering back to part1, I had to change to medium-blob because of image size.

    The output is fine, but my browser (Shiretoko - FireFox 3.5) displays the image at 67% to fit it in a non-scrolling window.

    Having read through the posts I'm guessing (and it is a guess) I'm going to need something like GD ?

    Now, don't get me wrong - I'm keen to learn this stuff, but..... Is there a way to force the image to display at 100% ?

    Some of the images are A4 size (about US Letter), and need to be displayed at 100%.
    I've asked Jordan about the best way to lower the file-size (they're 200k), possibly lowering the resolution to 92dpi for screen display - but I'd still need them to display at 100% scale.

    I thought along the lines of forcing the display to x pixels by y pixels, but the images are not all the same size due to some cropping I did of the original image files.

    They are currently 'hard-coded' into html, obviously I'm looking to make it dynamic.

    To give you some sort of idea of where I'm headed for the ones that need to be 100%, they can be seen at M.G. Judd Ltd. - Replacement Ignition & Door Keys

    I stress that that is a very much W-I-P area, where I've been learning how to put together a media CSS and a print CSS, along with non-java rolling buttons, etc , so there are not many pages that have data in them. (Home, Contact us & Starting handles....., from memory) - In my defense, it is all hand-coded !

    Now, per-se, I am open to having these pages remain as static. (they don't change), and I can still use the MySQL data for making the tables with (altough, again, as you can see from the mini-table at the top - formatting it would possibly be more touble than it is worth.
    Fortunately, the other pages aren't anything like these!!
    But, whichever way I do it, I go back to issues of bandwidth, so am at a bit of a pondery as to a fairly 'industry-standard' way of doing it.
    Is it okay to mix static & dynamic ?

    Regards,

    Phill.

  10. #99
    Join Date
    Apr 2009
    Location
    Uppsala, Sweden
    Posts
    9,547
    Blog Entries
    5
    Rep Power
    98

    Re: Tutorial: Storing Images in MySQL with PHP / Part II / Display your images

    Awesome, thanks Jaan. +rep of course.

  11. #100
    madhaninfo is offline Newbie
    Join Date
    Sep 2009
    Posts
    5
    Rep Power
    0

    Re: Tutorial: Storing Images in MySQL with PHP / Part II / Display your images

    $id = $_GET['id']; from which page this id no is getting please tell me

Closed Thread
Page 10 of 22 FirstFirst ... 8910111220 ... LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 3
    Last Post: 02-07-2011, 11:29 AM
  2. Tutorial: Storing Images in MySQL with PHP
    By Jordan in forum PHP Tutorials
    Replies: 47
    Last Post: 01-04-2011, 08:37 PM
  3. Beginner Storing images in XML file - Part II - Displaying image
    By Jaan in forum PHP Tutorials
    Replies: 6
    Last Post: 01-04-2011, 08:35 PM
  4. display images sequentially using PHP and MySQL
    By jhanjon in forum PHP Development
    Replies: 2
    Last Post: 10-08-2009, 12:11 PM
  5. Replies: 2
    Last Post: 07-16-2009, 12:48 PM

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