2
I have a registration page, and when the data is entered wrong, a alert();
reporting the error, but wish instead of being Alert, it was an error message just below the fields. I put a span with an error message and with the class sr-only
boostrap that makes what I wrote invisible, but how do I use js to make the class disappear? would be in place of Alert that is on echo.
HTML
<span id="cpf"></span>Cadastrar</button>
<span class="sr-only">Dados incorretos.</span>
PHP
echo"<script type='text/javascript'>alert('Alguém com esses dados já se cadastrou. Tente novamente.');window.location.href='cadastro.php';</script>";
If you are not going to use an alert it would be better to do it directly in php, using a
if
whether or not to classify– Isac
Hello, could you mark the answer as correct? Thank you!
– anderson seibert