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
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

Link to comment
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

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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.