homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / Code, Content, and Presentation / XML Development
Forum Library, Charter, Moderators: httpwebwitch

XML Development Forum

Xml form mail with Php to send
form mail with Xml need Php file to send

Msg#: 4405552 posted 2:29 pm on Jan 10, 2012 (gmt 0)


i have a Xml file :
<!-- input small width. Small width applies to the following types: name, email and phone -->

<!-- input small height. Small height applies to the following types: name, email and phone -->

<!-- input large height. Large height applies only to the message box -->

<!-- input field out color -->

<!-- input over color-->

<!-- input border thickness-->

<!-- input border color -->

<!-- input css tag-->

<!-- input warning text color -->

<!-- input warning message -->
<warningMessage><![CDATA[<warning>PLEASE FILL ALL REQUIRED( * ) FORMS!</warning>]]></warningMessage>

<!-- input sent message-->
<sentMessage><![CDATA[<delivered>Votre message a été envoyer, Merci !</delivered>]]></sentMessage>

<!-- input sent message-->
<serverErrorMessage><![CDATA[<warning>SERVER PROBLEM... PLEASE TRY AGAIN LATER! THANK YOU!</warning>]]></serverErrorMessage>

<!-- input button reset label-->

<!-- input button reset label-->

<!-- buttons out color -->

<!-- buttons over color -->

<!-- the url path to the PHP file-->

<!-- input fields -->
<input size="small" type="name" label="Nom" required="true" />
<input size="small" type="email" label="Email" required="true" />
<input size="small" type="phone" label="Tel" required="true" />
<input size="large" type="message" label="Message" required="true" />

I need Php File to send it to my mail.

Thank you.



WebmasterWorld Administrator httpwebwitch us a WebmasterWorld Top Contributor of All Time 10+ Year Member

Msg#: 4405552 posted 4:37 pm on Jan 10, 2012 (gmt 0)

Hi kamstudio, welcome to WebmasterWorld!

It looks to me like everything in the <settings> node are merely formatting options for the HTML form.

So, step one will be to parse the XML and render it into an HTML page. You can do that with an XSLT stylesheet, or you can write a PHP script that does it using some of PHP's built-in XML parsing tools.

sending mail via PHP is easily accomplished with the mail() command.

So what you'll do is set the "action" attribute of the <form> do it posts to a PHP script. Then in that PHP script, get the data from the $_POST array, format it the way you like, then use mail() to send it.

There are lots of tutorials explaining this on the www, and many in the PHP forum who can help if you get stuck.


Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / XML Development
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved