ok… here is my scripts dont know wats wrong it aint working maybe u guys can figure out wats wrong
I want to upload images (.jpg’s) to the database… ive defined the table with a coloum file as blob
here is the code for the form to update to the database,…
and here is the code to show the image on the page…(view image)
$count = 0;
$query = $db->query("SELECT * FROM $table_ft ORDER BY id");
while($ftlinks = $db->fetch_array($query)) {
$count++;
$ftimage[$count] = $ftlinks[file];
}
echo "<img src=$ftimage[0]>"
echo "<img src=$ftimage[1]>"
i am not sure if the image is uploading to the db or not… but before the fields were NULL when i created it after uploading it doesnt show anything in the command prompt…( so im assumiing some data is been written into the database )
please helpp
CREATE TABLE files(
Id int(4) NOT NULL auto_increment,
Binary mediumblob NOT NULL,
Name varchar(50) NOT NULL default '',
Size int(10) NOT NULL default '0',
Type varchar(50) NOT NULL default '',
PRIMARY KEY (Id)
)