MySQL Forums
Forum List  »  PHP

Re: how to show an image from mysql table
Posted by: harry he
Date: December 16, 2015 09:16PM

Thank you for your help :-)! I am only a newbie. So I need more clarifications. Here's my php code and test results. Please help!

<?php

$query = mysql_query("SELECT * FROM table WHERE id='1'");
$row = mysql_fetch_assoc($query);
$image = $row['image'];

// header("Content-type: image/jpeg"); ---- show code not image
// echo "<img src='" . $image . "'>"; --- show code not image
// echo $row['name']; ---- This working!

echo "img <src='".$image.":image/jpeg;base64,$b64'> "; -- show code not image

?>

Options: ReplyQuote


Subject
Written By
Posted
Re: how to show an image from mysql table
December 16, 2015 09:16PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.