Hello to everyone!
I'm new in this forum.
I read data from database columns with Chronoconnectivity, and for each row when I click a Send button It should send email with PHP email() function.
So in my body I have this code:
Where email_1,email_2,email_3 are database column that are replaced with relative emails.
In header I have:
I'm not able to pass to phpSendMail the email addresses I have in javascript sendMail.
The javascript sendMail() get the right arguments but I'm not able to pass to phpSendMail.
Is it possible to do?
Thank you very much!
Marco.
I'm new in this forum.
I read data from database columns with Chronoconnectivity, and for each row when I click a Send button It should send email with PHP email() function.
So in my body I have this code:
<input type="button" value="Send Email" onClick="sendMail('{email_1}','{email_2}','{email_3}');">
Where email_1,email_2,email_3 are database column that are replaced with relative emails.
In header I have:
<script language="javascript" type="text/javascript">
function sendMail(a,b,c) {
alert("<?PHP phpSendMail() ?>");
}
</script>
<?php
function phpSendMail()
{
$subject = 'subj';
$message = 'hello';
if (mail($to, $subject, $message)) {
echo("<p>Message successfully sent!</p>");
} else {
echo("<p>Message delivery failed...</p>");
}
}
}
?>
I'm not able to pass to phpSendMail the email addresses I have in javascript sendMail.
The javascript sendMail() get the right arguments but I'm not able to pass to phpSendMail.
Is it possible to do?
Thank you very much!
Marco.