I've searched all over and must be a fool.
Just started teaching myself PHP on Friday.
I'd like the message to go to two or three users instead of just one. If I were to include: john@hotmail.com and jane@hotmail.com, how I would include that in the code? Been trying to figure out how a cc: might work or something similiar.
Here is my current code:
<?php
$recipient = 'jamie@fourpeaksplanning.com';
$name = $_POST['name'];
$phone = $_POST['phone'];
$email = $_POST['email'];
$spectimereq = $_POST['specifictime'];
$sendtools=($_POST['sendtools'])?"Send planning tools: Yes":"Send planning tools: No";
$mornings=($_POST['mornings'])?"Mornings: Yes":"Mornings: Bad time";
$afternoons=($_POST['afternoons'])?"Afternoons: Yes":"Afternoons: Bad time";
$evenings=($_POST['evenings'])?"Evenings: Yes":"Evenings: Bad time";
$weekdays=($_POST['weekdays'])?"Weekdays: Yes":"Weekdays: Bad time";
$weekends=($_POST['weekends'])?"Weekends: Yes":"Weekends: Bad time";
$comments = $_POST['comments'];
$subject = "Request an appointment: $name";
$body .= 'Sender: '.$name . "\n";
$body .= 'Phone: '.$phone . "\n";
$body .= 'Email: '.$email . "\n\n";
$body .= "$mornings \n";
$body .= "$afternoons \n";
$body .= "$evenings \n";
$body .= "$weekdays \n";
$body .= "$weekends \n";
$body .= 'Specific time requested: '.$spectimereq . "\n\n";
$body .= "$sendtools \n";
$body .= 'Questions and comments: '.$comments . "\n\n";
mail($recipient, $subject, $body);
?>
In advance, thanks for the help!
Just started teaching myself PHP on Friday.
I'd like the message to go to two or three users instead of just one. If I were to include: john@hotmail.com and jane@hotmail.com, how I would include that in the code? Been trying to figure out how a cc: might work or something similiar.
Here is my current code:
<?php
$recipient = 'jamie@fourpeaksplanning.com';
$name = $_POST['name'];
$phone = $_POST['phone'];
$email = $_POST['email'];
$spectimereq = $_POST['specifictime'];
$sendtools=($_POST['sendtools'])?"Send planning tools: Yes":"Send planning tools: No";
$mornings=($_POST['mornings'])?"Mornings: Yes":"Mornings: Bad time";
$afternoons=($_POST['afternoons'])?"Afternoons: Yes":"Afternoons: Bad time";
$evenings=($_POST['evenings'])?"Evenings: Yes":"Evenings: Bad time";
$weekdays=($_POST['weekdays'])?"Weekdays: Yes":"Weekdays: Bad time";
$weekends=($_POST['weekends'])?"Weekends: Yes":"Weekends: Bad time";
$comments = $_POST['comments'];
$subject = "Request an appointment: $name";
$body .= 'Sender: '.$name . "\n";
$body .= 'Phone: '.$phone . "\n";
$body .= 'Email: '.$email . "\n\n";
$body .= "$mornings \n";
$body .= "$afternoons \n";
$body .= "$evenings \n";
$body .= "$weekdays \n";
$body .= "$weekends \n";
$body .= 'Specific time requested: '.$spectimereq . "\n\n";
$body .= "$sendtools \n";
$body .= 'Questions and comments: '.$comments . "\n\n";
mail($recipient, $subject, $body);
?>
In advance, thanks for the help!