Click here to Skip to main content
15,885,941 members
Home / Discussions / Linux, Apache, MySQL, PHP
   

Linux, Apache, MySQL, PHP

 
Questioninformation Pin
nilkanth rathod19-Jan-12 23:06
nilkanth rathod19-Jan-12 23:06 
AnswerRe:Information Pin
Manfred Rudolf Bihy20-Jan-12 0:09
professionalManfred Rudolf Bihy20-Jan-12 0:09 
AnswerRe: information Pin
Dhruv Dave14-Feb-12 19:19
Dhruv Dave14-Feb-12 19:19 
Questionbplustree Pin
meenakowshalya19-Jan-12 19:26
meenakowshalya19-Jan-12 19:26 
AnswerRe: bplustree Pin
Manfred Rudolf Bihy20-Jan-12 0:00
professionalManfred Rudolf Bihy20-Jan-12 0:00 
QuestionBlender part means Pin
sartar19-Jan-12 18:35
sartar19-Jan-12 18:35 
QuestionDisplay images from MySQL database using PHP help needed please !!! Pin
Josh7harington19-Jan-12 3:47
Josh7harington19-Jan-12 3:47 
AnswerRe: Display images from MySQL database using PHP help needed please !!! Pin
Gerben Jongerius19-Jan-12 23:12
Gerben Jongerius19-Jan-12 23:12 
You will have to create a seperate PHP file that is able to load the image from the database and output it to the browser. You then set the '?' in the sample code you gave to that PHP file.

The PHP script that will actually present the image to the browser will be something similar to this:
<?php
  mysql_connect("localhost","username","xxxxxxx");
  mysql_select_db("database");
  $rs = mysql_query("select image from images order by name_id ASC limit 1");
  $row = mysql_fetch_assoc($rs);
  $imagebytes = $row['image'];
  header("Content-type: image/jpeg");
  print $imagebytes;
?>


Note that you have to set the correct content type or the browser won't know what it is receiving. A full tutorial on storing images in a DB can be found at http://phpro.org/tutorials/Storing-Images-in-MySQL-with-PHP.html[^]
AnswerRe: Display images from MySQL database using PHP help needed please !!! Pin
Jon Heather25-Jan-12 9:54
Jon Heather25-Jan-12 9:54 
Questionhi evry body(i need expord doc with html) Pin
rahmani12315-Jan-12 19:02
rahmani12315-Jan-12 19:02 
AnswerRe: hi evry body(i need expord doc with html) Pin
cjoki18-Jan-12 8:59
cjoki18-Jan-12 8:59 
GeneralRe: hi evry body(i need expord doc with html) Pin
Mohibur Rashid18-Jan-12 18:46
professionalMohibur Rashid18-Jan-12 18:46 
GeneralRe: hi evry body(i need expord doc with html) Pin
rahmani12318-Jan-12 22:53
rahmani12318-Jan-12 22:53 
AnswerRe: hi evry body(i need expord doc with html) Pin
Niall Barr18-Jan-12 22:44
professionalNiall Barr18-Jan-12 22:44 
Questionphp code compiling (close source code) Pin
nhalimi15-Jan-12 8:33
nhalimi15-Jan-12 8:33 
AnswerRe: php code compiling (close source code) Pin
Luc Pattyn15-Jan-12 10:25
sitebuilderLuc Pattyn15-Jan-12 10:25 
GeneralRe: php code compiling (close source code) Pin
nhalimi15-Jan-12 17:17
nhalimi15-Jan-12 17:17 
GeneralRe: php code compiling (close source code) Pin
DigiOz Multimedia17-Jan-12 5:31
DigiOz Multimedia17-Jan-12 5:31 
GeneralRe: php code compiling (close source code) Pin
koolkabin@live.com23-Jan-12 5:11
professionalkoolkabin@live.com23-Jan-12 5:11 
Questionexport word Pin
rahmani12315-Jan-12 0:22
rahmani12315-Jan-12 0:22 
AnswerRe: export word Pin
Kevin Schaefer20-Jan-12 12:33
Kevin Schaefer20-Jan-12 12:33 
QuestionAssembler Pin
loctrice11-Jan-12 17:14
professionalloctrice11-Jan-12 17:14 
AnswerRe: Assembler Pin
arjo12913-Jan-12 15:50
arjo12913-Jan-12 15:50 
GeneralRe: Assembler Pin
loctrice14-Jan-12 3:24
professionalloctrice14-Jan-12 3:24 
AnswerRe: Assembler Pin
killabyte14-Jan-12 9:51
killabyte14-Jan-12 9:51 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.