(php:mysql) - Imagedarstellung aus Datenbank

Seite 1 von 1 - Forum: Coding Stuff auf overclockers.at

URL: https://www.overclockers.at/coding-stuff/php_mysql_imagedarstellung_aus_datenbank_44481/page_1 - zur Vollversion wechseln!


Maxx666 schrieb am 14.08.2002 um 10:35

1)Ich speichere die Pics in einen Mediumblob in der MySqlDB ab und kann es auch wieder anzeigen lassen. Nur gelingt es mir nicht, zusätzlich zum Bild auch normalen html-Text anzeigen zu lassen.
Geht das überhaupt?

2) Ist es möglich die Variable mit den Imagedaten auch in ein html-ImageFeld einzupflanzen, oder muss ich mir eine temporäre Datei erstellen?


hier mein code der das bild anzeigt, mehr aber auch schon nicht :D
<?php
$hostname = ... ;
$username = ... ;
$password = ... ;
$usertable = ... ;
$dbName = ... ;

if (isset($g_nr))
{
MYSQL_CONNECT($hostname, $username, $password) OR DIE
( "Unable to connect to database");
@mysql_select_db( "$dbName") or die( "Unable to select
database");

$select = "select * from $usertable where g_nr = '$g_nr'";
$result = MYSQL_QUERY($select);
while ($zeile = mysql_fetch_object ($result))
{
$s_pic = $zeile->G_GRAFIK;
$s_pic_mt = $zeile->G_GRAFIK_MT;
}
MYSQL_CLOSE();
}

Header( "Content-type: $s_pic_mt");
echo $s_pic;
?>


funka schrieb am 14.08.2002 um 12:29

<img src="./deinphpfilewasdeinbildmacht.php?bildid=23" alt="./deinphpfilewasdeinbildmacht.php?bildid=23&alttext=1">


Maxx666 schrieb am 14.08.2002 um 13:47

DANKE FUNKA...du bist a Traum!!!!


funka schrieb am 14.08.2002 um 14:32

ein erotischer hoff ich doch




overclockers.at v4.thecommunity
© all rights reserved by overclockers.at 2000-2025