|
Subject:
|
XML generation from PHP
|
|
Posted By:
|
Ashleek007
|
Post Date:
|
1/23/2006 7:27:46 AM
|
Hey everyone, I've posted this cry fro help in PHP also, thought you guys mite be able to help? query might be a litlle more relevent to you?!?!
I'll describe the problem first of all.
Problem I need to create an XML document containing variables taken from a MySql database passed through PHP 4.
I have the exact script in 'asp', shown below: -
<%@LANGUAGE="JavaScript"%> <%Response.ContentType="application/xml";%> <?xml version="1.0"?> <record> <name><firstname><%=Response.Write("firstname")%></firstname> <lastname><%=Request.Form.item("lastname")%></lastname></name> <address><line1><%=Request.Form.item("address1")%></line1> <line2><%=Request.Form.item("address2")%></line2> <city><%=Request.Form.item("city")%></city> <state><%=Request.Form.item("state")%></state> <postalcode><%=Request.Form.item("postalcode")%></postalcode> <country><%=Request.Form.item("country")%></country> </address> </record>
This script pulls information from an HTML form and asp creates an xml document. My problem is that:-
1. My server doesnt accept 'asp' 2. My Database is MySQL 3. I'm rubbish at asp!
So the solution would be a PHP version of this script, or a method to create an XML document through PHP.
I hope/wish it is as easy as the asp version, but have heard rumours that i need to use somthing scary called XSLT?!
Please help me phper's! Thanks, Ash
My new web design domain www.askmultimedia.co.uk
My new web design domain www.askmultimedia.co.uk
|
|