my ajax script is not working

i am using my ajax script for checking the existing email from the database, when i insert the email in the signup form it is redirecting mme to that checkdata.php file (this problem is on infinityfree website on other website or on my local server it is working fine) anyhelp should be appreciated… thanks

can you give us a URL?
what does the browser console say?
in addition you can enable PHP error reporting https://infinityfree.net/support/http-error-500/
so that will give you some basic clue