+ 2
Changing Styles with PHP
I'm working with a register and login page, I'm going to validate data with both PHP and JAVASCRIPT. Bcuz, if JAVASCRIPT is disabled in users computer, PHP will take care of validation! Now, if email field is invalid, I need to change the border color to red. and show the error msg I successfully made the display of error messages. But how to change the border color? In PHP? Thanks in Advance !!
2 Respostas
+ 2
Thank you Kunal Thakur ,
I got it already!!
Thanks for your Help!!
+ 1
Hello there
Try this
<label>Email</lable>
<input type="email" class="abcd <?php ($error['email']===true?'error':'')?>">
.error {
border: 3px solid red;
}