i want to show 'error' and styling the input form errors.
this my code so far :
this index.html :
<div class="error" style="display:none"><ol></ol></div>
<input name="name">
<input name="number">
and this one process.php:
<?php
$a =$_POST['name'];
$b =$_POST['number'];
if(empty($a)) {
echo
"<script>
$(document).ready(function (){
$('.error').slideDown();
$('.error ol').append('<li>Name Cannot Empty</li>');
$('input[name=\'name\']').css({"border":"1px solid red"});
});
</script>";
}
?>
its not working on my code, i dont have idea why.