I’d like to create a simple form in PHP where the user enters a little bit of information, which gets saved to an XML file on the server. This XML file should then be able to have the data in it read by PHP and manipulated… How would I do this?
-
- Read about how logo jewelry can be used to reward and motivate employees.
-
Recent Posts
- Using IContact To Optimize The Effectiveness Of Your Email Marketing
- The Reasons Behind Why You Should Use An IContact Coupon Code
- Software Programmers Or Software Developers Are Required To Develop Applications For Various Purposes.
- Several Quick Tricks For Boosting Your Internet Site Web Optimization
- Securing Your Important Data Files: Internet Data Backup
- Using Xbox LIVE and How To Get Codes
- Small businesses now have affordable access to sophisticated online and mobile telephone systems at affordable prices. Check out the big daddy of the Virtual PBX category with this RingCentral Review.
Blogroll
3 Comments
First, make a submit button to your website:
<input type="submit" value="create xml">
Second, add code like this to the top of the website to grab submissions.
<?php
if (isset($_GET['value1']) && isset($_GET['value2']))
{
$xmlstring = "<blah><value1>" + $_GET['value1'] + "</value1><value2>" + isset($_GET['value2']) + "</value2></blah>"
$myFile = "test.xml";
$filestream = fopen($myFile, ‘w’);
fwrite($filestream, $xmlstring);
exit(1);
}
?>
http://simonwillison.net/2003/Apr/29/xmlWriter/
There’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.
Post a Comment