Form problem

I see there have been like 50,000 threads on this subject, so my apologies for one more, but I haven’t really seen a solution that’s helped me, so here goes.

Basically, while testing the form, I’m not receiving mail. Code is as follows:


<form action="mailer.php" method="post">
            
            <p align="left" class="text">
                <textarea name="name" rows="1" cols="54">Name</textarea>
            </p>
            <p align="left" class="text">
                <textarea name="company" rows="1" cols="54">Company</textarea>
            </p>
            <p align="left" class="text">
                <textarea name="feedback" rows="10" cols="54">Feedback</textarea>
            </p>
            <p align="left" class="text">
                <input type="submit" value="Submit" />
            </p>
        </form>

and


<?php
    if(isset($_POST['submit'])) {

        $to  =  "my@email.com"; //obviously this was my personal email
        $subject = "Test";
        $name_field = $_POST['name'];
        $company_field = $_POST['company'];
        $message = $_POST['feedback'];
 
        $body  =  "From: $name_field
 Company: $company_field
 Message:
 $feedback";
 
        echo "Data has been submitted to $to!";
        mail($to, $subject, $body);

    } else {

        echo "Oopsie Scroodles!";

    }
?>

Am I missing something here? As far as I can tell, it looks like it should work, but it takes me to the “Oopsie Scroodles” page. :puzzled: