Irresistable Posted November 7, 2009 Share Posted November 7, 2009 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? Link to comment https://forums.phpfreaks.com/topic/180656-htmlphp-update-a-div-ids-context-on-every-page-automatically/ Share on other sites More sharing options...
mraza Posted November 7, 2009 Share Posted November 7, 2009 you need to make a new file name it updatediv.php and include it on all pages you wants to, then you only need to update that file and it will be updated to all pages. My idea Link to comment https://forums.phpfreaks.com/topic/180656-htmlphp-update-a-div-ids-context-on-every-page-automatically/#findComment-953143 Share on other sites More sharing options...
Irresistable Posted November 7, 2009 Author Share Posted November 7, 2009 I think I understand. How would the updatediv.php look like for example? If I include it into the pages, how will it get connected to the update div ID? Link to comment https://forums.phpfreaks.com/topic/180656-htmlphp-update-a-div-ids-context-on-every-page-automatically/#findComment-953145 Share on other sites More sharing options...
mraza Posted November 7, 2009 Share Posted November 7, 2009 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') ; ?> Link to comment https://forums.phpfreaks.com/topic/180656-htmlphp-update-a-div-ids-context-on-every-page-automatically/#findComment-953147 Share on other sites More sharing options...
Irresistable Posted November 7, 2009 Author Share Posted November 7, 2009 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. Link to comment https://forums.phpfreaks.com/topic/180656-htmlphp-update-a-div-ids-context-on-every-page-automatically/#findComment-953150 Share on other sites More sharing options...
mraza Posted November 7, 2009 Share Posted November 7, 2009 yes you can do both way, just remove the content and add in updatdiv.php file as it is.. so on all pages it should look like this. <div id="update"> <?php include('updatediv.php') ; ?> </div> Link to comment https://forums.phpfreaks.com/topic/180656-htmlphp-update-a-div-ids-context-on-every-page-automatically/#findComment-953153 Share on other sites More sharing options...
Irresistable Posted November 7, 2009 Author Share Posted November 7, 2009 Yes, I understand now. I'll try it out now. Link to comment https://forums.phpfreaks.com/topic/180656-htmlphp-update-a-div-ids-context-on-every-page-automatically/#findComment-953156 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.