Simple php Form
===

      
I have a simple contact from that i wish to "POST" via a function but i cant seem to get it to work? 

The form works when i have the action send to an external "send.php" file but i wish to keep everything in the one file. 

                              
                <form action="send()" id="contactform" method="POST">
                <p>Name<input type="text" name="name">
                  Email
                  <input type="text" name="email">
                  Phone
                  <input type="text" name="phone">
                </p>
                <p>Message
                  <textarea name="message" rows="6" cols="25"></textarea>
                  <br />
                <input type="submit" value="Send">
                </p>
                </form>

                <?php
                function send()
                {
                $name = $_POST['name'];
                $email = $_POST['email'];
                $phone = $_POST['phone'];
                $message = $_POST['message'];
                $formcontent=" From: $name \n  Phone: $phone \n Email: $email \n Message: $message";
                $recipient = "ma9ics@gmail.com";
                $subject = "Contact Form";
                $mailheader = "From: $email \r\n";
                mail($recipient, $subject, $formcontent, $mailheader) or die("Error!");
                echo "Thank You!";
                }
                ?>