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
You need to change your script:
Try using new FormData
instead of .serialize()
.
Note : You are used contentType
to false
that mean jQuery not to add a Content-Type header. You are using jQuery's .serialize() method which creates a text string in standard URL-encoded notation. You need to pass un-encoded data when using "contentType: false".