I have recently starting using php so i need your help. I have created a contact form that sends an email to me after someone submits,but how can i send a copy of the email or a new email to the submitter also ?
Thank you in advance.
This is my html code where user enters his email:
<div class="row">
<div class="col-md-6">
<div class="form-group">
<label for="form_email">Email </label>
<input id="form_email" type="email" name="email" class="form-control" placeholder="">
<div class="help-block with-errors"></div>
</div>
</div>
And this is the php code that sends an email to me :
<?php
$from = 'Someone <registration@registration.gr>';
// an email address that will receive the email with the output of the form
$sendTo = 'me <me@wxample.com>';
// subject of the email
$subject = 'Subject';
// form field names and their translations.
// array variable name => Text to appear in the email
$fields = array('name' => 'Ονομα', 'surname' => 'Επίθετο', 'need' => 'Need', 'title' => 'Τίτλος','specialty' => 'Ειδικότητα','foreas' => 'Φορέας','country' => 'Χώρα','city' => 'Πόλη','area' => 'Περιοχή','address' => 'Διευθυνση','tk' => 'T.K','tergasias' => 'Tηλ.Εργασίας','toikias' => 'Tηλ.Οικίας','mobile' => 'Κινητό','fax' => 'Φαξ','email' => 'Email');
// message that will be displayed when everything is OK :)
$okMessage = 'Successfull';
// If something goes wrong, we will display this message.
$errorMessage = 'There was an error while submitting the form. Please try again later';