Submitting forms / Sending E-Mail
I've managed to display layers via the YUI panels, but I'm having some trouble with the YUI Dialog:
I'd like to use the YUI Dialog to display a form. On klicking 'submit' the form should be sent to an e-mail adress. Displaying the form is no problem (same configuration as the panels), but how do I set up the form's recipient? Do I have to send the form to a separate file for further processing or can I handle the 'mailing' inside the main file itself?
Maybe there are any tutorials or examples on sending mails using the YUI? Thanks!
how to make submit button work..
On submitting the form is processed and email is not sent..
here is the submit button code..
{
xtype: 'button',
text: 'Send',
ui: 'confirm',
handler: function() {
var form = this.up('formpanel');
form.submit({
url:'contact.php',
method:'POST',
success: function() {
Ext.Msg.alert('Thank You', 'Your message has been received', function() {
form.reset();
});
}
});
}
}
and php code..
<?php
$message="$message";
$email="$email";
// From
$header="from: $name <$email>";
// Enter your email address
$to ='aaa@gmail.com';
$send_contact=mail($to,$message,$header);
// Check, if message sent to your email
// display message "We've recived your information"
if($send_contact){
echo "We've recived your contact information";
}
else {
echo "ERROR";
}
?>
please help me
thanks in advance..