<?php
require('connect.php');
if (isset($_POST['email']) && isset($_POST['password'])) {
$email = $_POST['email'];
$password = $_POST['password'];
$query = "INSERT INTO users (email, password) VALUES ('$email', '$password')";
$result = mysqli_query($connection, $query) ;
}
?>
...
<form name="f2" method="post">
<p> <input type="email" placeholder="email" name="email" required >
<input type="password" placeholder="password" name="password" maxlength="10" >
<input type="password" placeholder="confirm password" name="confirm" maxlength="10" >
<br><p class="error" aria-live="polite"></p>
<br><input type="submit" value="LOGIN" name="submit" class="reg" href='index1/index1.php'>
</p>
</form>