what might be wrong with my code
Who knows?
First off, your code is unreadable because it is not properly formatted. Format your code in posts here on the discussion boards (select your code and click the [Block Code] button). Alternatively, use an external service, like codepen to make a reduced test case, or make a gist on github to share larger sections of code.
Second, what does your code do? “Can’t load” is very vague and doesn’t describe what is actually happening. Does your ajax work, but nothing is returned by the php page? is your ajax call started, but never returns? does nothing happen at all?