Displaying Images

B

Bigh

Guest
If I have a field in the table that contains the name of an image file i.e.: myfile.jpg or contains the URL of a file; how could I get the actual image to show up on the form?

I also put a blob field containing an image and just got gobble-de-gook in the output of dadabik. Of course I may not have done it correctly.

I'm new at this so any help or pointers would be appreciated.

Bigh
 
S

shyam

Guest
I have a similar problem. I am trying to add a blob field to my table and use it to store pdf files, but has not been successul yet.

Wonder how the folks at Yale did it.

Shyam
 
F

fred

Guest
You can create a little script that will display images from files, databases or anything else by doing something as follows:

<?php

header("Content-Type: image/gif");

// connect to a db

$db = mysql_connect("localhost", "uname", "password");
mysql_select_db("dbname",$db);

// fetch a record into a variable called $img
// left as excercise

$img = mysql_fetch();

print $img;

?>
 
E

Eddy Tumath

Guest
Fred, I don't get it.

How does this display an image on the results table?
 
S

shyam

Guest
Fred:

Thanks for the response. I understand the basic principle. But it is the implementation details that I have problems with.
 
E

Eugenio

Guest
Bigh wrote:
>
> If I have a field in the table that contains the name of an
> image file i.e.: myfile.jpg or contains the URL of a file;
> how could I get the actual image to show up on the form?
>
> I also put a blob field containing an image and just got
> gobble-de-gook in the output of dadabik. Of course I may not
> have done it correctly.
>
> I'm new at this so any help or pointers would be appreciated.

This feature is supported by last versions of DaDaBIK.

Eugenio.

(Latest version of DaDaBIK when this message was posted: 2.2.1)
 
Top