I have a user registration form that a user can complete its fields ( user name, password , email ) to register his account. I want to change this form, when a user click submit button, it seems like that it clicks the button twice. in other words, I want to send two identical simultaneous requests to the server. how can I do this ? my html code is like this:
in fact I want to implement race condition issue. as you know in any user registration form the username must be unique. I want to test the web application that it can be get into the race condition and store two identical username or not?
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Register</title>
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.7.1/css/all.css">
<link href="style.css" rel="stylesheet" type="text/css">
</head>
<body>
<div class="register">
<h1>Register</h1>
<form action="register.php" method="post" autocomplete="off">
<label for="username">
<i class="fas fa-user"></i>
</label>
<input type="text" name="username" placeholder="Username" id="username" required>
<label for="password">
<i class="fas fa-lock"></i>
</label>
<input type="password" name="password" placeholder="Password" id="password" required>
<label for="email">
<i class="fas fa-envelope"></i>
</label>
<input type="email" name="email" placeholder="Email" id="email" required>
<input type="submit" value="Register">
</form>
</div>
</body>
</html>
Aucun commentaire:
Enregistrer un commentaire