Problem getting and image to display with link in Database
Posted: Fri Jun 20, 2008 4:10 am
Hi im very new to PHP and MYSQL,
I have build the website http://www.key-services.co.uk and on that site we have residential propertys listed over 5+ pages just as images and text.
I am now trying to set up all of the propertys in a database so they appear just as they do now, but it can be sorted by property price and have the option for the user to sort by other means.
Now as i said i am very new and so am just guessing my way through most of it.
I am using a book called php and MySql for Dummies and it has helped a little but i am having problems with the images.
In the book it states that if you want to have the record show an image then all you need to do it put the path of where the image is stored in a 'Char' field and it will display, now as i am sure you have guessed i am here because that is not working, all it is doing is displaying the Image Path as text.
I am testing this on a page in my website and this can be viewed by going to
http://www.key-services.co.uk/Cyprus_Re ... ttings.php?
The Table structure is below (this is pasted from my MySql manager and so is not the actual code but just info on how the fields are set up. the image location is
ResID char(3)
Type varchar(15)
Name varchar(100)
Desc text
Pic1 varchar(15)
Pic2 varchar(15)
Pic3 varchar(15)
Euro Price decimal(10,2)
CYP Price decimal(10,2)
:
(please remember i am a total Newb at this so Dumbed down language would be preffered)
Thank you in advance for any help received,
Gemma
I have build the website http://www.key-services.co.uk and on that site we have residential propertys listed over 5+ pages just as images and text.
I am now trying to set up all of the propertys in a database so they appear just as they do now, but it can be sorted by property price and have the option for the user to sort by other means.
Now as i said i am very new and so am just guessing my way through most of it.
I am using a book called php and MySql for Dummies and it has helped a little but i am having problems with the images.
In the book it states that if you want to have the record show an image then all you need to do it put the path of where the image is stored in a 'Char' field and it will display, now as i am sure you have guessed i am here because that is not working, all it is doing is displaying the Image Path as text.
I am testing this on a page in my website and this can be viewed by going to
http://www.key-services.co.uk/Cyprus_Re ... ttings.php?
The Table structure is below (this is pasted from my MySql manager and so is not the actual code but just info on how the fields are set up. the image location is
ResID char(3)
Type varchar(15)
Name varchar(100)
Desc text
Pic1 varchar(15)
Pic2 varchar(15)
Pic3 varchar(15)
Euro Price decimal(10,2)
CYP Price decimal(10,2)
:
(please remember i am a total Newb at this so Dumbed down language would be preffered)
Thank you in advance for any help received,
Gemma