Right so far I have connected successfully with no errors I have also got it connected to the right table but how would I have PHP echo the databases images as well as its text here is how I have it so far.
MYSQL DB
_______________________________________
4 rows
id, int auto increment
image, blob
name, text
contact, text
right thats the db now the PHP so far
$host = "test";
$username = "test";
$password = "test";
$dbname = "db";
$dbtable = "members";
mysql_connect("$host", "$username", "$password")or die("cannot connect");
mysql_select_db("$dbname")or die("cannot select DB");
$sql = "SELECT image,name,contact FROM $dbtable ";
$result = mysql_query($sql);
?>
the code does not error at all I'm just stuck as to what to do next what I need is for PHP to echo the 3 rows excluding the row ID how google does with the image then its name below it then the contact number below that. Also there are going to be about 7 peopleto echo so I need them also how Google displays them side by side across then down the page.
Anyone have any ideas thanks for any help cheers nik
ok so explain this to me in detail of what I do Am i storing the file path of the image if so how would I get the address.
one last thing would it be ok to store the image in some cases as one of the pages will only ever contain around 10 images.
MYSQL DB
_______________________________________
4 rows
id, int auto increment
image, blob
name, text
contact, text
right thats the db now the PHP so far
$host = "test";
$username = "test";
$password = "test";
$dbname = "db";
$dbtable = "members";
mysql_connect("$host", "$username", "$password")or die("cannot connect");
mysql_select_db("$dbname")or die("cannot select DB");
$sql = "SELECT image,name,contact FROM $dbtable ";
$result = mysql_query($sql);
?>
the code does not error at all I'm just stuck as to what to do next what I need is for PHP to echo the 3 rows excluding the row ID how google does with the image then its name below it then the contact number below that. Also there are going to be about 7 peopleto echo so I need them also how Google displays them side by side across then down the page.
Anyone have any ideas thanks for any help cheers nik
ok so explain this to me in detail of what I do Am i storing the file path of the image if so how would I get the address.
one last thing would it be ok to store the image in some cases as one of the pages will only ever contain around 10 images.