+ 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 !!

23rd Jun 2018, 9:02 AM
Hemath Kumar
Hemath Kumar - avatar
2 Antworten
+ 2
Thank you Kunal Thakur , I got it already!! Thanks for your Help!!
23rd Jun 2018, 10:40 AM
Hemath Kumar
Hemath Kumar - avatar
+ 1
Hello there Try this <label>Email</lable> <input type="email" class="abcd <?php ($error['email']===true?'error':'')?>"> .error { border: 3px solid red; }
23rd Jun 2018, 10:39 AM
ᴋᵘⁿᵃˡ
ᴋᵘⁿᵃˡ - avatar