0
I already have the system, only I don’t know how to develop the mistakes. 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 registered and everything, only the errors are missing. And I wanted to appear a browser script with the written error.