954,580 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Using PHP to Editing XML & HTM page from form

Here is my website
http://projecttower.site50.net/questions/

I have a collapsible panel there that whenever it's clicked it shows a form where you add a question, answer and ID.

the first form is for a file on my server called questions.htm
the index.htm file is a live search results page that reads question titles from a file on my server called links.xml
In links.xml it links to questions.htm through
Code:

Questionquestions.htm#Question1

Question1 is the ID of the Question on questions.htm

In questions.htm
for example in the code
Code:

Q: Do I have to change my domain nameA: No, you can keep the same domain name or register a new one and direct it to the new location.

What i want to do is in the first form, add a question and answer to questions.htm file under the last question on that page, and in the Question ID textbox field, for it to generate an ID for that question, for whatever is typed in that field.

The second form is meant to add a new link to the links.xml file.
the Question box would add a opening tag first and then for question it would create a tags with the typed question going between it and then for Question ID whatever is typed would create a tag generating questions.htm# whatever the ID is typed in the field and closed the tag.

Is this possible to do? Can somebody assist me with writing a code like this? Thanks.

IanArcher
Light Poster
29 posts since Oct 2011
Reputation Points: 10
Solved Threads: 0
 

Check SimpleXML . It helps to work with XML files. There is a good tutorial somewhere

evstevemd
Senior Poster
3,713 posts since Jun 2007
Reputation Points: 462
Solved Threads: 392
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: