所以,我一直在学习 PHP 等,但问题是,我可以用相同的名称和 IP 注册很多次。
这是我的 register.php 的代码
<html>
<head>
<title>
Gebruikerspaneel
</title>
</head>
<body>
<?php
include 'connect.php';
?>
<?php
include 'functions.php';
?>
<?php
include 'titelbar.php';
?>
<h3>Registreer hier</h3>
<form method='post'>
<?php
if(isset($_POST['submit'])){
$gebruikersnaam = $_POST['gebruikersnaam'];
$wachtwoord = md5($_POST['wachtwoord']);
if(empty($gebruikersnaam) or empty($wachtwoord)){
echo "<p>Gelieve alles in te vullen!</p>";
} else {
mysql_query("INSERT INTO gebruikers VALUES('', '$gebruikersnaam', '$wachtwoord', '2', 'a')");
echo "<p>U bent succesvol geregistreerd!</p>";
}
}
?>
Gebruikersnaam:<br />
<input type='text' name='gebruikersnaam' />
<br /><br />
Wachtwoord:<br />
<input type='password' name='wachtwoord' />
<br /><br />
<input type='submit' name='submit' value='Registreren' />
</form>
</body>
</html>
我该如何做到这一点,以便您收到错误并且您的信息不会发送到数据库?
我是荷兰人,所以有些东西是荷兰语。