I already have the system, but I do not know how to develop the errors. For example: Passwords do not match, user already exists, email already exists.
<?php
include('../includes/config.php');
$usuario = $_POST ["usuario"];
$email = $_POST ["email"];
$senha = MD5($_POST["senha"]);
$query = "INSERT INTO 'users' ( 'usuario' , 'email', 'senha', 'usuario_id' )
VALUES ('$usuario', '$email', '$senha', '')";
mysql_query($query);
echo "";
?>
And a form:
<form action="registrar.php" method="post">
<input name="usuario" type="text" id="usuario"><br>
<input name="email" type="text" id="email"><br>
<input name="senha" type="password" id="senha">
<input name="senha2" type="password" id="senha2">
</form>
The system already works, already registers and everything, only the errors are missing. And I wanted to get a browser script with the typed error.