Hi how would i GET information from a form that a user enters into a textbox combobox or w.e and write it to a xml file.
either HTML javascript or php will be appreciated.
Hi how would i GET information from a form that a user enters into a textbox combobox or w.e and write it to a xml file.
either HTML javascript or php will be appreciated.
Well, saying that you have a page with a form like:
<form name="form" action="getdata.php" method="post">
<input type="text" name="tb" />
<input type="submit" value="Submit" />
</form>
your getdata.php (this is just an example of the name) page, which will collect the data and save them in a xml file, should be like this:
<?php
$text = htmlentities($_POST['tb']);
$doc = new DOMDocument();
$textareaNode = $doc->createElement("textbox");
$textNode = $doc->createTextNode($text);
$textareaNode->appendChild($textNode);
$doc->appendChild($textareaNode);
$doc->save("data.xml");
?>