how to store images with links in mysql database and how to display it on the web page?

July 31, 2010 by · 1 Comment
Filed under: Computer 

I have the intention of creating a website for a lot of electronic books that shows the image of each electronic book, descriptions and download links in a row. I know that in PHP with MySQL is the best way forward. But I was painfully understand how. I would appreciate any word of you. Thanks! m /

Artikel how to store images with links in mysql database and how to display it on the web page? yang terkait di situs lainnya:

Display an image from a MySQL database in a web page via PHP

Display an image from a MySQL database in a web page via PHP ... Issues, PHP and MySQL solutions - (2008-01-14) Using PHP to upload images / Store on MySQL database ...

Sumber: http://www.wellho.net/mouth/937_Display-an-image-from-a-MySQL-database-in-a-web-page-via-PHP.html

Example - PHP form, Image upload. Store in MySQL database. Retrieve.

... in PHP - (2006-12-28) Display an image from a MySQL database in a web page via ... ho do i retrieve the images to a web page ... PHP form, Image upload. Store in MySQL database.

Sumber: http://www.wellho.net/solutions/php-example-php-form-image-upload-store-in-mysql-database-retreive.html

PHP/MySQL script for programmatic random hyperlink and image ...

Random Links and images with PHP & MySQL ... script requires a web server with PHP and a MySQL database to store ... rows from the database $result = mysql_query ("SELECT * FROM links ...

Sumber: http://www.designplace.org/scripts.php?page=1&c_id=13

Display Image From Database

Display Image From Database - It is possible to store images in a database using a number of third ... to upload and save image to database, and then read and show image on web page

Sumber: http://script.wareseeker.com/ASP/display-image-from-database.zip/2195

MYSQL :: How Do I Get PhpMyadmin To Display Images?!

Sponsored Links: ... Working With Images In MYSQL How do I store and retrieve images in MYSQL database, and display this image on a web page, using PHP.

Sumber: http://www.bigresource.com/MYSQL-How-do-I-get-phpMyadmin-to-display-images--LPW4qBM5.html

Comments

One Response to “how to store images with links in mysql database and how to display it on the web page?”
  1. just "JR" says:

    1. You don’t store images in a database: you store their filename and path in DB, and the images somewhere else.
    Database: IE
    —-
    table `books`:
    `bookno` int(5) // NOT zero, the book number 1-nnn
    `imageno` int(5) // dito
    `fname` varchar(30)
    —-
    Some data:
    1, 1, “cover.jpg”
    1, 2, “authorpic.jpg”
    1, 3, “me.jpg”
    2, 1, “cover.jpg”

    —-

    Server folder structure:
    root
    —- books
    ——–book1
    ————pics
    ————texts
    ——–book2

    2. Say you want second picture of book1, using $bookno (here = 1) and $picno (here = 2)
    $path = “books/book” . sprintf(“%u”,$bookno) . “/pics/”;
    // will give you path = “books/book1/pics/”
    // get the name of the image:
    $sql = “select `fname` from `books` where `book` = ‘”.$bookno.”‘ and `imgno` = ‘”.$picno. “‘ limit 1″;
    $list = mysql_query($sql);
    $lst = mysql_fetch_array($list);
    $filename = $lst['fname'];
    // now your link(s):
    $txt = ““;
    echo $txt;
    or
    $txt = ““;
    echo $txt;

Speak Your Mind

Tell us what you're thinking...
and oh, if you want a pic to show with your comment, go get a gravatar!


Powered by Yahoo! Answers