Mailer

<?php 

if(isset($_POST['submit']))
{
 
$name=$_POST['name'];
$email=$_POST['email'];
$subject=$_POST['subject'];
$comments=$_POST['comments'];
$to="devika@cetpainfotech.com";
$headers="From:$name<$email>";
$message="Name:$name\n\n   Email:$email\n\n   Subject:$subject\n\n  Comments:$comment\n\n";

if (mail($to,$subject,$message,$headers))
{
 echo"Mail sent";
 
 
 
} 
else
{
 echo "Error: Try again later";

} 
 
 
}


?>

<!DOCTYPE HTML>
<html lang ="en-US">
<head>
<meta charset ="UTF-8">
<title>devika</title>
</head>

<body>

<form action="" method="post">
<p>Name<br/>
<input type="text" name ="name" id="" ></p>
<p>Email<br/>
<input type="text" name ="email" id="" ></p>
<p>Subject<br/>
<input type="text" name ="subject" id="" ></p>
<p>Comments<br/>
<textarea type="text" name ="comments" id="" cols="30" rows="10"></textarea></p>
<p>
<input type="submit" name ="submit" id="" value="Send Email"></p>

</form>
</body>
</html>
===============================================================================

<?php 
if (isset ($_POST['submit'])){
$f_name=$_FILES['myfile']['name'];
$f_tmp=$_FILES['myfile']['tmp_name'];
$store="uploads".$f_name;
if(move_upload_file($f_tmp,$store)){
echo"upload";
}



}?>
<!DOCTYPE HTML>
<head>
<title></title>
</head>
<body>
<form action="" method="post"  enctype="multipart/form-data">
<p>File<br/>
<input type="file" name ="myfile" id="" ></p>
<input type="submit" name ="submit" value="upload" id="" ></p>
</form>
</body>
</html>