I can' t figure it out. else { $ message = register( $ adminNo, $ username, $ password, $ fullname, $ function) ; echo" < script> alert( ' Successfully registered! Fatal error: Call to undefined function alert( ) in phpfile. Then return ' false' in the validate function. < script type= " text/ javascript" > alert( " Please enter the something in the searchbox" ) ; < / script>