I imagine the insert script to be something like:
- Code: Select all
$url = "blah.com/myfolder/images01.jpg";
$query = "INSERT INTO images VALUES (NULL, $url);
$result = mysql_query($query);
print "Image URL inserted, thank you."
Then to retrieve the url and display the image, is I believe where the trouble is. I have:
[code]
$query = mysql_query("SELECT * FROM images_test WHERE pid=3");
$row = mysql_fetch_array($query);
$content = $row['image'];
header('Content-type: image/jpg');
echo $content;
All I get is a notice saying the image can not be displayed because it contains errors.
Any hints or a good tutorial link would be great, thanks!


