TalkPHP

TalkPHP (http://www.talkphp.com/forums.php)
-   General (http://www.talkphp.com/general/)
-   -   viewing an image from a table in a database (http://www.talkphp.com/general/2234-viewing-image-table-database.html)

sarmenhb 02-12-2008 07:29 AM

viewing an image from a table in a database
 
first off,

heres the structure of my table, where content is where the image or file will be stored

Code:

-- Table: upload

-- DROP TABLE IF EXISTS `upload`;

CREATE TABLE `upload` (
  `id`      int AUTO_INCREMENT NOT NULL,
  `name`    varchar(30) NOT NULL,
  `type`    varchar(30) NOT NULL,
  `size`    int NOT NULL,
  `content`  mediumblob NOT NULL,
  `ip`      text COMMENT 'ip',
  `title`    text,
  /* Keys */
  PRIMARY KEY (`id`)
) ENGINE = InnoDB;

what im wondering is what kind of code do i type to show the image as a link.

EyeDentify 02-12-2008 10:37 AM

As usal, nobody would like to write all the code for you without you eaven making an effort to overcome the problem yourself.

I suggest you check out the PHP: Hypertext Preprocessor website as a first stop.
And a second stop would be to google.

Then come back with some sample code if you donīt get it to work and we all will be glad to help.

Good Luck

/EyeDentify

ReSpawN 02-12-2008 11:18 AM

I agree with EyeDentify. Just latterly type into google what you need and the magic webguru will speak.

How to Store images in mysql database with php


All times are GMT. The time now is 07:30 PM.

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0