littlemetz85 Posted August 7, 2007 Share Posted August 7, 2007 I've been working on this project for awhile now but still can't get it to work so I'm turning to all of you for some help. I have made a PDF application with a HTTP submit button at the bottom. This submits to a php script that I have on my server. What I want to do is to take the submitted data and save it as an XML file on my server. I have been using the $_POST method to get the data sent to the script but it puts it in an array. I can't figure out from here how to make it into an XML file. Any suggestions? Thanks, Paul Quote Link to comment https://forums.phpfreaks.com/topic/63785-pdf-submit-and-_post/ Share on other sites More sharing options...
Psycho Posted August 7, 2007 Share Posted August 7, 2007 It all depends on what structure you need for the XML file based upon the variables. This might help you get started: http://www.developerfusion.co.uk/show/3944/ Quote Link to comment https://forums.phpfreaks.com/topic/63785-pdf-submit-and-_post/#findComment-317900 Share on other sites More sharing options...
littlemetz85 Posted August 7, 2007 Author Share Posted August 7, 2007 That helps give me some ideas but the string is all one cell in the array and there is no easy way to separate it. Is there something other then $_POST that I should be using to obtain the submitted data? Or is there something different that I need to do with the PDF submit button? Thanks, Paul Quote Link to comment https://forums.phpfreaks.com/topic/63785-pdf-submit-and-_post/#findComment-317910 Share on other sites More sharing options...
Psycho Posted August 8, 2007 Share Posted August 8, 2007 Nothing else you can do that I can think of. You could use GET, but that would be even a bigger hassle. Now, if you are the one creating the form and you are the one that will parsing the data, then you can simply set up the fields and the parsing to work how you need them. Every situation is different, but if you understand your data it shuldn't be that big of a deal. For example, lets say I have 5 fields for children. I could name all the fields "children[]" and then the post data will contain a subarray for all the children values: $_POST['children'][0], $_POST['children'][1], etc. Quote Link to comment https://forums.phpfreaks.com/topic/63785-pdf-submit-and-_post/#findComment-318122 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.