I have a simple form for a website allowing users to send a query/message to my clients email address.
I'm struggling trying to get this working. So far I have managed to find some code (also via stack overflow) that allows the form to send a blank email to the correct address upon submit. I seem to be missing some code or something that makes the submit button pull information from the form to send.
Below is the code I have.
Thanks (PS I have no experience with PHP, only as to alter the code I previously found to get this far).
<?php
mail('chameleonyeadon@gmail.com', $_POST['name'], $_POST['email'], $_POST['number'], $_POST['message']);
?>
<form method="post" action="email.php" enctype="text/plain">
<!-- name-->
<label class="contact__form--label"><em>What is your name?</em><br>
<input type="text" name="name" class="contact__form__inputbox contact__form__inputbox--marg contact__form__inputbox--pad" placeholder="Enter your name here" maxlength="30" required="required"/></label><br>
<!-- email-->
<label class="contact__form--label"><em>Do you have an email address?</em><br>
<input type="email" name="email" class="contact__form__inputbox contact__form__inputbox--marg contact__form__inputbox--pad" placeholder="Enter your email address here" maxlength="50" required="required"/></label><br>
<!-- number-->
<label class="contact__form--label"><em>Can we contact you by phone?</em><br>
<input type="number" name="number" class="contact__form__inputbox contact__form__inputbox--marg contact__form__inputbox--pad" placeholder="Enter a phone number we can use here" maxlength="50" required="required"/></label><br>
<!-- message-->
<label class="contact__form--label"><em>What is your message?</em><br>
<textarea name="message" required="required" class="contact__form__inputbox contact__form__inputbox--marg contact__form__textarea contact__form__inputbox--pad" placeholder="Enter your message here"></textarea></label><br>
<div class="contact__form__btns">
<input type="submit" value="Send" class="btn btn--brdr btn--padding--less">
<input type="reset" value="Clear" class="btn btn--brdr btn--padding--less btn__formpos">
</div>
</form>