# Form problem

**URL:** <https://forum.kirupa.com/t/form-problem/257842>\
**Category:** Uncategorized\
**Created:** [April 17, 2008, 4:11pm UTC](https://forum.kirupa.com/t/form-problem/257842 "2008-04-17T16:11:06Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Awesome\_O\_4000](https://avatars.discourse-cdn.com/v4/letter/a/dbc845/32.png) [@Awesome\_O\_4000](https://forum.kirupa.com/u/Awesome_O_4000)\
**Post date:** [April 17, 2008, 4:11pm UTC](https://forum.kirupa.com/t/form-problem/257842/1 "2008-04-17T16:11:06Z")

</div>

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:

```php

<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

<?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:
