I have a form and I want to change the color of the border-color to red if the user / email has already been registered in my database.
I tried something like:
<script>
$(document).ready( function(){
$('#btn_escrever').click(function(){
if($(usuario_existe == 1){
$('#usuario').css({'border-color': '#A94442'});
}
</script>
Btn_style is the button where I use to register; the user_exist is a variable that I am using through php to check whether the user already exists or not in bd, if it has a value of 1, it already exists. Something is wrong, can anyone help me?