Jump to content

News Feed update?


Guest danielti
 Share

Recommended Posts

Guest danielti

I'm designing a CSS website that has a news section on every page with the same information that will be updating frequently. Is there a way to update the content within this section on each page all at once, without having to open each and every one and changing it manually? Thanks!

Link to comment
Share on other sites

I'm designing a CSS website that has a news section on every page with the same information that will be updating frequently. Is there a way to update the content within this section on each page all at once, without having to open each and every one and changing it manually? Thanks!
This isn't something that can be accomplished through CSS...yet. You're going to have to use a server-side language for this. You could use an iframe for something like this, but I wouldn't recommend it. You're really going to want to look into a server-side language. Some of the most commonly used server-side languages are PHP, Ruby, Perl, Python, and others. PHP is the easiest and most forgiving language to learn if you're just starting out. It's also the most widely available language in terms of web hosts.In PHP, you could accomplish this with something as simple as (although ideally no code should be embedded in the markup):
<div id="news"><? echo(file_get_contents('newsfeed.html')); ?></div>

Edited by Dilated
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...