I have googled and googled this and followed a dozen tutorials and trouble shooting guides and can still not ge the submit button to work. It just opens the php page with no code show. I have run the and it returns the info showing that PHP is installed on the server.
Please can someone help me out with the PHP code and let me know where I have messed up.
<form action="http://www.rexu.co.uk/email_submit.php" method="post">
<input type="name" value="name" class="form-control" placeholder="Name">
<input type="email" value="email" class="form-control" placeholder="Email">
<input type="tel" value="tel" class="form-control" placeholder="Phone">
<textarea type="message" value="message" class="form-control" placeholder="Message" rows="6"></textarea>
<input type="submit" name="submit" class="form-control" value="SEND EMAIL">
</form>
<?php
if (isset($_POST['submit'])) {
$to = 'myemail@mysite.com'; // changed for security reason. Have been using my acutal email address
$subject = 'From Rexu Contact Form';
$message = 'name: ' . $_POST['name'] . "\r\n\r\n";
$message .= 'email: ' . $_POST['email'] . "\r\n\r\n";
$message .= 'tel: ' . $_POST['tel'] . "\r\n\r\n";
$message .= 'message: ' . $_POST['message'];
}
?>
Many Thanks