,I'm using datefrom and dateto to make a dropdown menu and then display the dates between these dates, but it's not showing up and I keep getting this error message in the console. VM652:1UncaughtSyntaxError:Unexpectedtoken'<'," I'm using datefrom and dateto to make a dropdown menu and then display the dates between these dates, but it's not showing up and I keep getting this error message in the console. This is the script: This is the php file: I want to display rows with dates between the selected dates but the error keeps showing up in the console log and the table is not showing
"...isnotvalidJSONatJSON.parse(
-PHP Chinese Network Q&A
VM652:1 Uncaught SyntaxError: Unexpected token '<', "
"... is not valid JSON at JSON.parse (
$date $sales "; } // Close the connection mysqli_close($conn); ?>
This error is related to the response error of your ajax method. This code sends the result of the
ajax
request. You should useecho json_encode($data);
in your php file.