473,326 Members | 2,192 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

Edit a file's div section only using PHP

228 100+
Hi:)

I have a series of pages that are totally static [no db required]. I dont want to use databases unless it is impossible. The contents of this page is stored in the main div section named maincontent.

Is there anyway i could update that section only from PHP? That is, make changes to the file?

I need to change the file but update only that section?
Dec 9 '09 #1
7 2223
Markus
6,050 Expert 4TB
Depending on your PHP version have a look at the DOM and DOMXML extensions. You can use these to work with your HTML.
Dec 9 '09 #2
kovik
1,044 Expert 1GB
What is the governing force that determines what changes are going to be made to this page? Is it based on database entries?
Dec 11 '09 #3
code green
1,726 Expert 1GB
Javascript function innerHTML() may be useful
Dec 11 '09 #4
Markus
6,050 Expert 4TB
@code green
As far as I remember innerHTML is an HTMLElement's (I probably got the object wrong) property. That is, it is not a function: el.innerHTML = "Some text"
Dec 11 '09 #5
Dormilich
8,658 Expert Mod 8TB
correct, innerHTML is not a function.
Dec 12 '09 #6
samvb
228 100+
thanks for all your replies guys. I want to make a permanent change (like edit a file and save it in notepad) with php. The section i want to edit is a div named content. the file is not associated with db by all means. Its a plain html file that i need to access from php, make changes in the div section and update the changes.
Dec 13 '09 #7
kovik
1,044 Expert 1GB
Then like I said, what is the governing force? What is it that you do that requires this page to be updated?
Dec 13 '09 #8

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Alex | last post by:
Interested in more .NET stuff visit www.dedicatedsolutions.co.uk The DataList is not as powerful as the DataGrid. It requires more work from you since it has no default data presentation format....
0
by: Alex | last post by:
Imports System Imports System.Data Imports System.Data.SqlClient Imports System.Web.UI Imports System.Web.UI.WebControls Imports System.Configuration Public Class Main : Inherits Page ...
4
by: Glenn M | last post by:
I have a shared XML file on a server . i also have one xslt file that performs a simple transform on in to view the data. now i want to have another page that lets users modify the shared xml...
9
bhcob1
by: bhcob1 | last post by:
Hey guys, 'Update or CancelUpdate without AddNew or Edit' On my database i keep occasionly get this error when i try and edit a field, it is not everytime. It will be working fine and then this...
1
by: natwong | last post by:
Hi All, I'm hoping that someone could help me out since I'm new with Access. Background: Database was set up as a simple data entry and reporting tool for Program Initiatives. The data...
0
by: yukijocelyn | last post by:
I have experienced a problem here while doing a form for accessing datadbase using MS Access. I'm using the AccessDataSource control, and using Gridview to pull the data from the database. I am able...
5
by: ShadowLocke | last post by:
This class makes use of System.Collections.Hashtable to enumerate all the settings in an INI file for easy access. Its very simplistic, and completely re-useable. Solid addition for any app that...
1
by: chromis | last post by:
Hi, I'm having trouble fully implementing the edit section of a contact admin system, so far I have written the following: - Bean (Contact.cfc) - Data Access object (ContactDAO.cfc) - Gateway...
2
by: samvb | last post by:
Hi:) I have a series of pages that are totally static . I dont want to use databases unless it is impossible. The contents of this page is stored in the main div section named maincontent. Is...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.