PDA

View Full Version : Can html form data be sent to an XML file??


bunion
01-05-2005, 08:09 PM
Hi there i have created a News Ticker. (using software) The news items are fed/read from a file called data.xml (attached) by the flash news ticker. I am aiming to create a html form where people can submit news items and they can be entered/sent into the XML file and old items automatically deleted. E.g. Max 10 news Items, when it becomes full number the last one is erased and any new entry moves what was first in the list to number 2 etc. Is it possible to create a html form that is capable of this? (i will would make the xml file have public write/read access) Here is a link to my test news ticker and below that is the code for my Html form.
http://www.freewebs.com/jptoolbar/Tools/Ticker.html


ok i havent made form yet ill post it later

bunion
01-05-2005, 08:09 PM
http://www.freewebs.com/jptoolbar/Tools/data.xml

chilipie
01-05-2005, 08:33 PM
I don't see why not. It's not really any different from writing to a flat-file for storing data. It won't be too hard to write a simple PHP script to transfer the data from the form to the XML file. You may want to have some sort of security check though; things like this are prone to spam/abuse.

bunion
01-06-2005, 06:05 PM
thanks for the reply chillipie
i admit i havent written the html form yet but it would look something like this

https://www.sharemation.com/supershare/form.JPG

My question now is, once ive made the form, where would it submit data to?
another page and the php file would read it? or would it submit the data directly to the php file? If this Php script is simple could a noob to php like me write it/ would there be examples on the internet that i could simply edit?

Cheers