<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: How can I take user input and save it to an XML file in PHP?</title>
	<atom:link href="http://www.learnxmlws.com/how-can-i-take-user-input-and-save-it-to-an-xml-file-in-php/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.learnxmlws.com/how-can-i-take-user-input-and-save-it-to-an-xml-file-in-php/</link>
	<description></description>
	<lastBuildDate>Sun, 18 Dec 2011 08:00:32 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
	<item>
		<title>By: Eric</title>
		<link>http://www.learnxmlws.com/how-can-i-take-user-input-and-save-it-to-an-xml-file-in-php/#comment-78</link>
		<dc:creator>Eric</dc:creator>
		<pubDate>Sat, 19 Dec 2009 12:36:09 +0000</pubDate>
		<guid isPermaLink="false">http://www.learnxmlws.com/how-can-i-take-user-input-and-save-it-to-an-xml-file-in-php/#comment-78</guid>
		<description>First, make a submit button to your website:
&lt;input type=&quot;submit&quot; value=&quot;create xml&quot;&gt;

Second, add code like this to the top of the website to grab submissions.
&lt;?php
    if (isset($_GET[&#039;value1&#039;]) &amp;&amp; isset($_GET[&#039;value2&#039;]))
    {
$xmlstring = &quot;&lt;blah&gt;&lt;value1&gt;&quot; + $_GET[&#039;value1&#039;] + &quot;&lt;/value1&gt;&lt;value2&gt;&quot; + isset($_GET[&#039;value2&#039;]) + &quot;&lt;/value2&gt;&lt;/blah&gt;&quot;

$myFile = &quot;test.xml&quot;;
$filestream = fopen($myFile, &#039;w&#039;);
fwrite($filestream, $xmlstring);
exit(1);
    }  
?&gt;</description>
		<content:encoded><![CDATA[<p>First, make a submit button to your website:<br />
&lt;input type=&quot;submit&quot; value=&quot;create xml&quot;&gt;</p>
<p>Second, add code like this to the top of the website to grab submissions.<br />
&lt;?php<br />
    if (isset($_GET['value1']) &amp;&amp; isset($_GET['value2']))<br />
    {<br />
$xmlstring = &quot;&lt;blah&gt;&lt;value1&gt;&quot; + $_GET['value1'] + &quot;&lt;/value1&gt;&lt;value2&gt;&quot; + isset($_GET['value2']) + &quot;&lt;/value2&gt;&lt;/blah&gt;&quot;</p>
<p>$myFile = &quot;test.xml&quot;;<br />
$filestream = fopen($myFile, &#8216;w&#8217;);<br />
fwrite($filestream, $xmlstring);<br />
exit(1);<br />
    }<br />
?&gt;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: snabby</title>
		<link>http://www.learnxmlws.com/how-can-i-take-user-input-and-save-it-to-an-xml-file-in-php/#comment-79</link>
		<dc:creator>snabby</dc:creator>
		<pubDate>Sat, 19 Dec 2009 12:36:09 +0000</pubDate>
		<guid isPermaLink="false">http://www.learnxmlws.com/how-can-i-take-user-input-and-save-it-to-an-xml-file-in-php/#comment-79</guid>
		<description>http://simonwillison.net/2003/Apr/29/xmlWriter/</description>
		<content:encoded><![CDATA[<p>http://simonwillison.net/2003/Apr/29/xmlWriter/</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: DouglasHolt</title>
		<link>http://www.learnxmlws.com/how-can-i-take-user-input-and-save-it-to-an-xml-file-in-php/#comment-80</link>
		<dc:creator>DouglasHolt</dc:creator>
		<pubDate>Sat, 19 Dec 2009 12:36:09 +0000</pubDate>
		<guid isPermaLink="false">http://www.learnxmlws.com/how-can-i-take-user-input-and-save-it-to-an-xml-file-in-php/#comment-80</guid>
		<description>There&#039;s a great answer for this over on Experts Exchange. 

http://www.experts-exchange.com/Web_Development/Web_Languages-Standards/PHP/PHP_Databases/Q_23299970.html

In short you will use fwrite() command to write the data to an xml file with the post values received from your form.</description>
		<content:encoded><![CDATA[<p>There&#8217;s a great answer for this over on Experts Exchange. </p>
<p>http://www.experts-exchange.com/Web_Development/Web_Languages-Standards/PHP/PHP_Databases/Q_23299970.html</p>
<p>In short you will use fwrite() command to write the data to an xml file with the post values received from your form.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

