Hello everyone, I have an ajax method that builds an html table with the data received from a php parser file. Whenever the button is pressed on the html, the method is triggered sending a request to the php file. For some reason, whenever the method is triggered, I keep receiving Unexpected token < in JSON at position 0 error in the console. What do you think could be the problem, even though the data sent back is formatted as JSON? Thanks a lot!

r/webdev - Keep getting Unexpected token < in JSON at position 0 error. Not sure what to do.

homeDataParser.php

r/webdev - Keep getting Unexpected token < in JSON at position 0 error. Not sure what to do.

home.html

P.S. Screens of the php and the html file is added to the post.



Source link

Write A Comment