Web Design Forum  
 
Go Back   Web Design Forum > Web and Graphic Design > Web Design

Reply
 
LinkBack Thread Tools Display Modes
Old 02-23-2009, 06:34 PM   #1
New Member
 
Join Date: Feb 2009
Posts: 3
Post External content into html

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!
kachina_music is offline   Reply With Quote


Old 03-02-2009, 02:03 AM   #2
Bronze Member
 
Join Date: Feb 2009
Posts: 35
Default

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.
JayT is offline   Reply With Quote
Old 03-08-2009, 08:03 PM   #3
Gold Member
 
conor's Avatar
 
Join Date: Oct 2008
Location: Ireland
Posts: 349
Default

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.
__________________
Conor
conor is offline   Reply With Quote
Reply

Tags
content, html, xml

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 04:10 AM.


Camera Forum - Computer Forum - Web Design Forum

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
Content Relevant URLs by vBSEO 3.6.0 ©2011, Crawlability, Inc.