lukelee Posted November 18, 2008 Share Posted November 18, 2008 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 More sharing options...
networkthis Posted November 18, 2008 Share Posted November 18, 2008 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 Link to comment https://forums.phpfreaks.com/topic/133161-question-about-php-xml-flash/#findComment-692560 Share on other sites More sharing options...
lukelee Posted November 18, 2008 Author Share Posted November 18, 2008 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? Link to comment https://forums.phpfreaks.com/topic/133161-question-about-php-xml-flash/#findComment-692562 Share on other sites More sharing options...
lukelee Posted November 18, 2008 Author Share Posted November 18, 2008 I have done it, thanks for help Link to comment https://forums.phpfreaks.com/topic/133161-question-about-php-xml-flash/#findComment-692589 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.