added without showing success message

php needs improved error checking handling
javascript
if(arr["success"] ==="yes"){
$("success").innerHTML = "Successfully added student";
}