hi godwasadj, welcome in knowledgesutra community i hope you will like your time in here.
and about the code you posted, it is not related to how you can connect your email to a form. to be more clear, you can't connect the code of submit button with your email, because it is only a way to tell the browser that you want to send the information in the form you filled now. but you can create a PHP file, name it (mail.php for example) that contains the code of your email, usually it will be like this:
<?php
$to = "YOUR EMAIL SHOULD BE HERE";
$subject = "Contact Us";
$email = $_REQUEST['email'] ;
$message = $_REQUEST['message'] ;
$headers = "From: $email";
$sent = mail($to, $subject, $message, $headers) ;
if($sent) {print "OK"; } else {print "We encountered an error";
}
?>
and your form should contains this code:
<form method="post" action="mail.php">
Name
<input type="text" name="name" /><br/>
E-mail
<input type="text" name="email" /><br/>
Message
<textarea name="message" cols="50" rows="10" >
</textarea><br/>
<input type="submit" value="send" /><br/>
</form>
as you can see, the action attribute is what will connect your form with the PHP file that contains your email.
i hope that will helps you a little, good luck.