<script type="text/javascript">
$("#sign_up").on('click', function() {
$.post('./includes/ajax.php', { action: 'register' } , function(result) {
var result = JSON.parse(result);
if(result ) { $("#register_result") = result; document.write(result); }
});
});
$("#register_form").submit(function() {
return false;
});
</script>
In the console it's returning "All inputs must be entered" - which is what I want it to return.
However, the alert is returning [object Object]. Why is this?
alert()for debugging