Formulaire XML avec envoi en PHP
Posté : 10 janv. 2012, 16:41
Bonjour,
J'ai un formulaire en Xml qui doit normalement renvoyer des données vers un fichier PHP qui par la suite renvoi ces données vers une adresse mail.
Voici le code xml :
[xml]<form>
<settings>
<!-- input small width. Small width applies to the following types: name, email and phone -->
<inputSmallWidth>365</inputSmallWidth>
<!-- input small height. Small height applies to the following types: name, email and phone -->
<inputSmallHeight>27</inputSmallHeight>
<!-- input large height. Large height applies only to the message box -->
<inputLargeHeight>100</inputLargeHeight>
<!-- input field out color -->
<inputOutColor>0x2c2c2c</inputOutColor>
<!-- input over color-->
<inputOverColor>0x986464</inputOverColor>
<!-- input border thickness-->
<inputBorderThick>1</inputBorderThick>
<!-- input border color -->
<inputBorderColor>0xffffff</inputBorderColor>
<!-- input css tag-->
<inputCSSTag>input</inputCSSTag>
<!-- input warning text color -->
<inputWarningTextColor>0x660000</inputWarningTextColor>
<!-- 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-->
<buttonSendLabel><![CDATA[<send>Envoyer</send>]]></buttonSendLabel>
<!-- input button reset label-->
<buttonResetLabel><![CDATA[<reset>Vider</reset>]]></buttonResetLabel>
<!-- buttons out color -->
<buttonsOutColor>0xb1b1b1</buttonsOutColor>
<!-- buttons over color -->
<buttonsOverColor>0x986464</buttonsOverColor>
<!-- the url path to the PHP file-->
<phpFileURL>php/contact.php</phpFileURL>
</settings>
<!-- 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" />
</form>[/xml]
il me faut maintenant le code de la page Php qui va envoyer ces données.
Merci
J'ai un formulaire en Xml qui doit normalement renvoyer des données vers un fichier PHP qui par la suite renvoi ces données vers une adresse mail.
Voici le code xml :
[xml]<form>
<settings>
<!-- input small width. Small width applies to the following types: name, email and phone -->
<inputSmallWidth>365</inputSmallWidth>
<!-- input small height. Small height applies to the following types: name, email and phone -->
<inputSmallHeight>27</inputSmallHeight>
<!-- input large height. Large height applies only to the message box -->
<inputLargeHeight>100</inputLargeHeight>
<!-- input field out color -->
<inputOutColor>0x2c2c2c</inputOutColor>
<!-- input over color-->
<inputOverColor>0x986464</inputOverColor>
<!-- input border thickness-->
<inputBorderThick>1</inputBorderThick>
<!-- input border color -->
<inputBorderColor>0xffffff</inputBorderColor>
<!-- input css tag-->
<inputCSSTag>input</inputCSSTag>
<!-- input warning text color -->
<inputWarningTextColor>0x660000</inputWarningTextColor>
<!-- 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-->
<buttonSendLabel><![CDATA[<send>Envoyer</send>]]></buttonSendLabel>
<!-- input button reset label-->
<buttonResetLabel><![CDATA[<reset>Vider</reset>]]></buttonResetLabel>
<!-- buttons out color -->
<buttonsOutColor>0xb1b1b1</buttonsOutColor>
<!-- buttons over color -->
<buttonsOverColor>0x986464</buttonsOverColor>
<!-- the url path to the PHP file-->
<phpFileURL>php/contact.php</phpFileURL>
</settings>
<!-- 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" />
</form>[/xml]
il me faut maintenant le code de la page Php qui va envoyer ces données.
Merci