I have created one web page in html form which contains only 3 fields name, email and message and one button.Second page of php for sending mail named status.php.but when i click on send mail button it does not redirect to status.php instead it downloads that page.why this is happening.Anybody can tell.. here is the code:
<form method="post" action="status.php">
    <ol>
      <li>
        <label for="name">Name (required)                  </label>
        <input id="name" name="name" />
      </li>
      <br /><li>
        <label for="email">Email Address (required)    </label>
        <input id="email" name="email" />
      </li>
      <br /><li>
        <label for="message">Your Message                      </label>
        <textarea id="message" name="message" rows="8" cols="50"></textarea>
      </li>
      <br /><li>
            <input type="submit" name="submit" value="Send Email"/>
      </li>
    </ol>
</form>
PHP Code :
<?php
    if(isset($_POST['submit']))
    {
        $to = 'jafar.nadaf@ajinkyatechnologies.com';
        $subject = 'Email Test';
    }
    $status = 'Name: ' .$_POST['name']. "\r\n\r\n";
    $status .= 'Email: ' .$_POST['email']. "\r\n\r\n";
    $status .= 'Message: ' .$_POST['message'];
    echo $status;
?>
 
     
     
    