11Tami Posted January 18, 2007 Share Posted January 18, 2007 Hi, I need to know how to pull data from an xml file with php. For example, lets say I have a form field. When an xml file internet address is put into the form field and the "submit" button is pushed, I need to have just some of the xml fields appear on the page. Anyone have any basic code to get me started? I have no idea where this starts. I already know how to make forms I just don't know how to pull the data to populate the form fields. Thank you very much. Quote Link to comment Share on other sites More sharing options...
11Tami Posted January 18, 2007 Author Share Posted January 18, 2007 nevermind, found something else to help. Quote Link to comment Share on other sites More sharing options...
genericnumber1 Posted January 18, 2007 Share Posted January 18, 2007 Saw you said nevermind but my post was already written so I'll still post it for people that search the forums for the same question...To get the contents of a URL you can do [url=http://www.php.net/file_get_contents]file_get_contents()[/url] as for parsing the XML you might want to look into the [url=http://www.php.net/xml]XML[/url] and the [url=http://www.php.net/simplexml]Simple XML[/url] functions. There's also a [url=http://www.phpfreaks.com/tutorials/44/0.php]tutorial[/url] you could read (I'm sure it is wonderful, I just glanced at it). Quote Link to comment 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.