Menü schliessen
Created: December 16th 2020
Last updated: December 16th 2020
Categories: IT Development
Author: Marcus Fleuti

AJAX request returns 0

Tags:  Ajax,  null,  PHP,  request,  return

Are you using a form with AJAX? Are you getting 0 returned from the form?

Solution

AJAX Requests which aren't finished always return 0. To finish an AJAX-Request inside of the callback function you have to call exit at the end of the execution.

exit;