Saturday, 28 September 2013

input button is not sending info, it is not doing nothing

input button is not sending info, it is not doing nothing

When I press the submit button, nothing happens.
HTML:
<from action="php/reglog.php" method="POST" name="register">
<span>register</span><br>
<label>login :<input type="text" name="login" maxlength="20"
placeholder="login" autofocus></label><br>
<label>password :<input type="password" name="password" maxlength="12"
placeholder="password"></label><br>
<input type="submit" value="register"><br>
<a href="login.html">or login</a>
</from>
PHP:
<?php
$result = mail("test@test.com","User","Mail recived with this info:
\nLOGIN: $_POST[login] \nPASSWORD: $_POST[password]");
if ($result) {
echo "<p>Message Sent successeful!</p>";
}
else{
echo "<p>Error occured while sending</p>";
}
?>

No comments:

Post a Comment