Jump to content

Show pictures from DB

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
1 reply to this topic

#1
Flezria

Flezria

    Learning Programmer

  • Members
  • PipPipPip
  • 55 posts
Hello guyse, i made this upload system wich is working.
But i got this problem with getting the pictures out im uploading to the mysql db.
I wanna know how i can get the pictures out and showing them, here my code:

<?php

$connect = mysql_connect("","","");
$select_db = mysql_select_db("",$connect);

$selectpic = mysql_query("SELECT picture, title, discription FROM upload");

while($rowpic = mysql_fetch_row($selectpic)) {
  
    echo $rowpic[0];
    echo "<br />";
    echo $rowpic[1];
    echo "<br />";
    echo $rowpic[2];
}

?>

( yes i know i spelled description wrong, just too lazy to fix it :D )

thanks from flezria

#2
Orjan

Orjan

    Writes binary right handed and hex left handed

  • Moderators
  • 3,299 posts
this tutorial will help you alot.

http://forum.codecal...our-images.html

You can't just echo the content of the picture in the middle of the web page. you need to follow some special ways, which is shown in that tutorial.
__________________________________________
I study Information Systems at Karlstad University when I'm not on CodeCall