Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XSLT
|
XSLT General questions and answers about XSLT. For issues strictly specific to the book XSLT 1.1 Programmers Reference, please post to that forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XSLT section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 23rd, 2006, 08:27 AM
Authorized User
 
Join Date: Jan 2004
Posts: 78
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Ashleek007
Default XML generation from PHP

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
__________________
My new web design domain
www.askmultimedia.co.uk





Similar Threads
Thread Thread Starter Forum Replies Last Post
Backup generation of SQL Server Databse using XML siddharth28 ASP.NET 1.0 and 1.1 Professional 3 June 12th, 2007 07:17 AM
CSV and XML with PHP NEO1976 PHP How-To 1 July 17th, 2006 02:33 AM
JSP Code Generation using XML ? javadude XSLT 0 June 9th, 2005 07:50 AM
XML with php Ashleek007 XML 0 April 10th, 2005 10:30 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.