External content into html

kachina_music

New Member
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!
 

JayT

New Member
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.
 

conor

New Member
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'; ?>
3. No other changes should be required.

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.
 
Top