I'm trying to figure out how to have an email system on a site I'm building. The goal is three input spaces (their name, email, and message) and the system take that input and send it in an email. Or even if there's a way to just get the email/message sent from the site to my email.
I was also wondering if there's a way to edit the text box or anything for this system using CSS, if so, I'll toy with it and figure it out. If not, any suggestions of how to go about it?
I tried writing a .php script and here's what I wrote:
<?php
if($_POST["message"]) {
mail("myemail@email.com", "Message via site",
$_POST["insert message here"]. "From: useremail@email.com");
}
?>
And the HTML that gets the form box:
<form method "post" action = "emailform.php">
<textarea name = "message"></textarea>
<input type = "submit">
</form>
However, this ends up saving the .php script to my computer and no email or anything is sent. I know I'm doing something wrong here, but this was at the very least supposed to be a test to see if the system works with the remaining input boxes and tuning to be done later.