0
I have a form and 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_write is the button I use to register; the usuario_existe is a variable I’m using in php to check if the user already exists or not in bd, if it has value 1, it is because it already exists. Something’s wrong, someone can help me?
Change $('#user'). css({'border-color': '#A94442'}); by $( "#user" ).css( "border-color", "#A94442"); Reference: http://api.jquery.com/css/
– ElvisP
got solution to that question? closes it.
– Julio Henrique