Ok i've never done this before, but i've suddenly realised its the only solution.
I've got an xml file, which defines form field names, types, descriptions and sizes, as well as to what category they belong to and a few other parameters.
What I want to do is have PHP parse this xml file, and create the form fields accordingly on the page..
So say you have this:
<category="design">
<item="colours" />
<format="dropdown" />
<maxpoints="3" />
<text="Colours of the page" />
</item>
</category>
And the PHP would generate:
There would be multiple items within each category, and several categories.
Could anyone give me some help on generating this PHP from the XML file?
I've got an xml file, which defines form field names, types, descriptions and sizes, as well as to what category they belong to and a few other parameters.
What I want to do is have PHP parse this xml file, and create the form fields accordingly on the page..
So say you have this:
<category="design">
<item="colours" />
<format="dropdown" />
<maxpoints="3" />
<text="Colours of the page" />
</item>
</category>
And the PHP would generate:
Code:
<p>Colours of the page: <select name="design_colours"><option value="0">0</option><option value="1">1</option><option value="2">2</option><option value="3">3</option> points. Comments: <input type="text" name="comments_design_colours" />
There would be multiple items within each category, and several categories.
Could anyone give me some help on generating this PHP from the XML file?