Image display for news articles
Posted: Fri Dec 05, 2003 6:25 am
(Sorry if it is in the wrong forum)
Hi,
Im new to PHP so go easy!
I have created a MySQL database to store news articles with the following fields.
Title, Date, main article, smlImg, lgeImg
I created a script which lists all articles and then turns the title into the click through for the main detail. I want to display the image referenced in the db.
Now this is where my Q lies. Do I store the full path to the image in the DB or should I store only the name and create an image path variable in my detail page file?
What is the best practice solution?
Hi,
Im new to PHP so go easy!
I have created a MySQL database to store news articles with the following fields.
Title, Date, main article, smlImg, lgeImg
I created a script which lists all articles and then turns the title into the click through for the main detail. I want to display the image referenced in the db.
Now this is where my Q lies. Do I store the full path to the image in the DB or should I store only the name and create an image path variable in my detail page file?
What is the best practice solution?