0
This is guys speaking. I have a question, I would like to know how I do to display an alert Div next to an input if this field is not filled in or the informed data already exist in the database.`
<form action="Cadastrado.php" method="POST">
<input type="text" name="nome" placeholder="Nome" class="nome" id="nometeste" >
<input type="text" name="sobrenome" placeholder="Sobrenome" class="sobrenome" >
<input type="text" name="login" placeholder="Email" class="login" maxlength="40" >
<input type="password" name="senha" placeholder="Senha" class="senha" maxlength="30" >
<input type="submit" value="Cadastrar" class="botao">
</form>
</div>`
You can use the jQuery Validation, very simple to use and allows you to do remote validation, which is what you want to do when checking if the values are already in the database.
– fernandoandrade