Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Regular Coder
    Join Date
    Dec 2002
    Location
    UK
    Posts
    180
    Thanks
    0
    Thanked 0 Times in 0 Posts

    update xml file from html form

    First off I am fairly new to XML. I have read a few tutorials on it, it's syntax etc.. but have yet to define a xml document.

    My query is, is it possible to take from a html form that a user would submit to a php script, and for this submitted data to go into a xml file (say messages.xml) ?

    I know this could be done using sql or similar but am keen to see if it can be done using XML through PHP.

    If it can be inserted into a xml file, can messages.xml also be viewed (so that you can see the user submitted values?

    Thanks a lot in advance.

  • #2
    raf
    raf is offline
    Master Coder
    Join Date
    Jul 2002
    Posts
    6,589
    Thanks
    0
    Thanked 0 Times in 0 Posts
    your xml-file is just a regular textfile, and you can edit it just like any textfile.
    or you can read in the xml-file, parse it and store it in an array and then edit the array and finally recreate the xml-file from the array. (or turn it into html and print it on screen).
    If your application will only be viewed in IE, then you can use your xml-file as an external data-island and show/filter/sort/edit it inside the browser.

    but it would make a lott more sense to store your data in a db and then generate the xml file when you need it.
    Posting guidelines I use to see if I will spend time to answer your question : http://www.catb.org/~esr/faqs/smart-questions.html

  • #3
    Regular Coder
    Join Date
    Dec 2002
    Location
    UK
    Posts
    180
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Right. I thought the database would be the best option for showing/editing purposes.

    Cheers


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •