if (isset($_POST['register'])) {
if (self::CheckEnteredData() === true) {
self::ActionsWithDB();
self::ActionsWithCookies();
Main::Redirect("/");
} else {
$output = self::CheckEnteredData();
include_once("templates/signup.php");
}
} else {
include_once("templates/signup.php");
}
if (isset($_POST['register'])) {
if (self::CheckEnteredData() === true) {
self::ActionsWithDB();
self::ActionsWithCookies();
Main::Redirect("/");
} else {
$output = self::CheckEnteredData();
include_once("templates/signup.php");
}
} else {
include_once("templates/signup.php");
}
<form action="/account/signup/index.php" method="POST" id="reg">
<input type="text" name="login" placeholder="login"><span>V</span><br>
<input type="email" name="email" placeholder="email"><span>V</span><br>
<input type="password" name="password" placeholder="password"><span>V</span><br>
<input type="password" name="repassword" placeholder="password again"><span>V</span><br>
<input type="submit" name="register">
</form>