|
|
#1 |
|
New Member
![]() Join Date: Feb 2009
Posts: 3
|
Hi all,
As a relative newcomer in site building, I have a problem that Im trying to find a solution to. I basically have a site designed to promote music and artists, the layout of which is coded with div tags and css. In one of these div tags, I plan to have a 'featured' section in where I promote artists, on a weekly rotation. Ive been trying to figure out how I can contain this content in an external file, and then have it load the content into the html page (within a table, within the div tag). The content consists of text, an image and link for each featured artist. My first thought was to use an XML file and Javascript, but following the various tutorials etc on the web I haven't been successful. I was wondering is this the right way to do it? Is there a simpler way? Thanks! |
|
|
|
|
|
#2 |
|
Bronze Member
![]() Join Date: Feb 2009
Posts: 35
|
Yes there is a right way to do this, and no it's not simple.
The perfect solution to your problem would be to insert the information about the crack-heads... I mean "artists", into a mysql database and then use a php statement to retrieve their criminal record... I mean information from the database and display it in your div or table. |
|
|
|
|
|
#3 |
|
Gold Member
![]() Join Date: Oct 2008
Location: Ireland
Posts: 349
|
theres no point in delving into php/mysql for something small like this. The only method I know of is a php include. This is how to do it:
1. First rename your file to have a .php extention instead of .html 2. Add this code where you want to include the file: Code:
<?php include 'file.html'; ?> One thing to keep in mind is if you want to test this locally then you need to have PHP installed. Nevertheless it should still work when the website is live and on a server.
__________________
Conor |
|
|
|
![]() |
| Tags |
| content, html, xml |
| Thread Tools | |
| Display Modes | |
|
|