Jump to content

question about php, xml, flash


lukelee

Recommended Posts

I am making a flash form, which include, name, phone, email, radio button,checkbox... when people click submit, I want this form be generated to an xml file through php. I know how to send email through php. but really no idea how to generate an xml through php. can anyone help please?

 

here is the data I collect from flash:

 

$subject = "My Flash site reply";

$name = $_POST["ename"];

$message = $_POST["emessage"];

 

can anyone please show me how to continue?

Link to comment
https://forums.phpfreaks.com/topic/133161-question-about-php-xml-flash/
Share on other sites

You can simply do this using the fwrite command:

 

// This will be your new xml document.

$feed = @fopen("new_document.xml",'w');

 

 

//This command will write in the new_document.xml

//Basically fill in whatever you want in your xml document here.....

 

fwrite($feed,"<?xml version=\"1.0\" encoding=\"ISO-8859-1\" ?><?xml-stylesheet type=\"text/css\" href=\"http://www.yourdomain.com/rss\" ?>

\n<rss version=\"2.0\">\n\n");

 

 

//This will close the new_document.xml

@fclose($feed);

 

Its as easy as 1,2,3

You can simply do this using the fwrite command:

 

// This will be your new xml document.

$feed = @fopen("new_document.xml",'w');

 

 

//This command will write in the new_document.xml

//Basically fill in whatever you want in your xml document here.....

 

fwrite($feed,"<?xml version=\"1.0\" encoding=\"ISO-8859-1\" ?><?xml-stylesheet type=\"text/css\" href=\"http://www.yourdomain.com/rss\" ?>

\n<rss version=\"2.0\">\n\n");

 

 

//This will close the new_document.xml

@fclose($feed);

 

Its as easy as 1,2,3

thanks for helps. but what is href=\"http://www.yourdomain.com/rss\

and xml is supposed to be something like:

 

<node>

<child>

123

</child>

</node>

how to i insert those data?

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.