ok..so I can get all of the other information from my database, but when i try to get images, it displays as a code i dont recognise. here is the query:
<?php
// Connecting, selecting database
$link = mysql_connect('localhost', 'username', 'password')
or die('Could not connect: ' . mysql_error());
echo 'Connected successfully';
mysql_select_db('webimages') or die('Could not select database');
// Performing SQL query
$query = 'SELECT * FROM tbl_artwork';
$result = mysql_query($query) or die('Query failed: ' . mysql_error());
// Printing results in HTML
echo "<table>\n";
while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) {
echo "\t<tr>\n";
foreach ($line as $col_value) {
echo "\t\t<td>$col_value</td>\n";
}
echo "\t</tr>\n";
}
echo "</table>\n";
// Free resultset
mysql_free_result($result);
// Closing connection
mysql_close($link);
?>
and this is the result i get (I've just included one record, but i got a page full of them!):
Connected successfully0000000001 Abstract Blue 1 2001 Abstract 250 Yes JFIFC C xd: !"1AQ2Baq#3RC 2000*2500mm canvas
here is the table:
tbl_artwork
Field Type Null Default Links to Comments MIME
artworkID int(10) No
title varchar(25) No
dateCreated year(4) No 0000
category enum('Abstract', 'Figurative', 'Landscape') No Abstract
cost int(6) No 0
forSale enum('Yes', 'No') No Yes
image tinyblob No
size varchar(20) Yes NULL
paintedOn enum('board', 'canvas', 'paper') No board
Can anybody please help? Thanks,
Diz