díky moc, tak jsem to trochu upravil, ale zase mě to blbne. netuším proč, ale ted mi to zas hlasi, ze
Notice: Undefined index: heslo in C:\PHPWebServer\http_docs\reg.php on line 9
Notice: Undefined index: heslo2 in C:\PHPWebServer\http_docs\reg.php on line 9
<html>
<body>
<?php
$db_connect = mysqli_connect();
if (!$db_connect)
echo mysqli_connect_error();
if($_POST['heslo'] != $_POST['heslo2'] and isset($_POST['login'], $_POST['login']))
{
$sql_prikaz =
"INSERT INTO kniha_navstev(login,pass,email) "
."VALUES('"
.mysqli_real_escape_string($db_connect,$_POST['login'])
."','"
.mysqli_real_escape_string($db_connect,$_POST['heslo'])
."','"
.mysqli_real_escape_string($db_connect,$_POST['email'])
."')"
;
mysqli_query($db_connect, $sql_prikaz);
}
if($db_connect)
mysqli_close($db_connect);
?>
<form action="" method="post">
<table>
<tr><td>Login:</td> <td><input type="text" name="login" maxlength="32"/></td></tr>
<tr><td>Heslo:</td> <td><input type="password" name="heslo" maxlength="32"/></td></tr>
<tr><td>Oveření hesla:</td> <td><input type="password" name="heslo2" maxlength="32"/></td></tr>
<tr><td>E-mail:</td> <td> <input type="text" name="email" value="" maxlength="64"/></td></tr>
</table>
<input type="submit" name="send" value="Zaregistrovat"/>
</form>
</body>
</html>