Jump to content

Html/PHP update a Div ID's context on every page automatically


Irresistable

Recommended Posts

I'm not sure how to word this.

However. Lets say I have a Div ID named Updates, and I have 4 pages .. eg:

Home, Tutorials, job vacancies, contact us

 

They all have the update Div ID.

How do I set it so that if I update the Update Div ID, on any page, that when I save that page, it'll update the rest of the Update Div ID's (The Div ID will be called Updates, on all pages)

 

It might require PHP to do this, but I'm not sure. I assume it'll be PHP.

 

Any help?

lets say you have div like this on your pages

<div id="update">

here your content..

</div>

 

cut all div and paste in new file name it updatediv.php or whatever you wants. then on the place of above code on all pages add this line:

 

<?php include('updatediv.php') ; ?>

 

Do I cut the context, and not the actual div part?

I done something similar with password protection.

It includes a file which has the password prompt.. and when I open the page.. it opens up the included file, inside the file that im opening..

Would it work like that? If so.. that cant be done.

 

It's a normal webpage, with more than 1 div. It's only 1, that I want to update.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.