Jump to content
php.lv forumi

bildes atspoguļošana uz brauzera no phpmyadmin


LinuX

Recommended Posts

Sveiki, pirmo reizi saskaros ar bildes ievietosanu datubāzē un atspoguļošanu brauseri, ievietot man it ka izdevās, phpmyadmin tipam uzliku BLOB un itkā ievietojās, bet kad izsaucu bildi ara paradas tikai bildes nosaukums. mekleju google.lv, lai nebutu jūs jāaizkavē, jo tas laikam viegli, diemžēl google.lv neko neatradu. ja varat kkā palīdziet. kā dabūt āra bildi? Paldies.

Link to comment
Share on other sites

nosauc sito par image.php

$con=mysql_connect('host','user','pass') or die (mysql_error());
mysql_select_db('dbname',$con) or die (mysql_error());

$q="SELECT * FROM table" or die (mysql_error());
$data=mysql_query($q);
$showdata=mysql_fetch_assoc($data);


header("content-type:image/jpg");
echo $showdata["rindas_nosaukums_kur_bilde"];



 

talak ievieto lapa ar <img src=image.php width=200 height=200>

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...