When I try to check user input name is already exist by ajax form submit !But it only get Undefined index: username in sessions.php ,what is missin
Undefined index: username
sessions.php
Use $.post() for ajax :
$('#confirm').click(function(e){ e.preventDefault(); $.post("sessions.php", $.param($("#saveuser").serializeArray()), function(data) { // use this ajax code console.log(data); }); });