Hi all.
I have a very basic question: how can I take the values in a PHP/HTML form and export them to XML?
For example, suppose I have index.php, which is a job submission form as follows:
And the required XML output for the job feed is as follows:
Without worrying about the validations for the time being, how do I output the form data to XML using a PHP script?
[!]Note:[/!] I'd very much like to keep the code generic such that it parses the
and automatically outputs the appropriate XML in the <job>...</job> section.
Thanks in advanced!
BFP
I have a very basic question: how can I take the values in a PHP/HTML form and export them to XML?
For example, suppose I have index.php, which is a job submission form as follows:
Code:
<form id="jobSubmit" name="jobSubmit" method="post" action="">
<label>Title <input type="text" name="title" /></label> <br />
<label>Unique Reference # <input type="text" name="referencenumber"></textarea></label> <br />
<input type="submit" name="btnSubmit" value="Submit" />
</form>
Code:
<?xml version="1.0"?>
<source>
<job>
<title><![CDATA[Example Job Title]]></title>
<referencenumber><![CDATA[unique123131]]></referencenumber>
</job>
</source>
[!]Note:[/!] I'd very much like to keep the code generic such that it parses the
Code:
name="X"
Thanks in advanced!
BFP