,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'<',"
"...isnotvalidJSONatJSON.parse()atO"> Uncaught syntax error when parsing JSON on response using AJAX request: Unexpected token '<', "<br />-PHP Chinese Network Q&A
Uncaught syntax error when parsing JSON on response using AJAX request: Unexpected token '<', "
P粉846294303
P粉846294303 2023-11-01 10:06:57
0
1
659

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:1 Uncaught SyntaxError: Unexpected token '<', "
"... is not valid JSON at JSON.parse () at Object.success (:18:30) at c (jquery-3.6.0.min.js:2:28327) at Object.fireWith [as resolveWith] (jquery-3.6.0.min.js:2:29072) at l (jquery-3.6.0.min.js:2:79901) at XMLHttpRequest. (jquery-3.6.0.min.js:2:82355)

This is the script:

This is the php file:

 $date $sales "; } // Close the connection mysqli_close($conn); ?>

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

P粉846294303
P粉846294303

reply all (1)
P粉318928159

This error is related to the response error of your ajax method. This code sends the result of theajaxrequest. You should useecho json_encode($data);in your php file.

$data = []; while ($row = mysqli_fetch_assoc($result)) { $data[] = $row; echo json_encode($data); }
    Latest Downloads
    More>
    Web Effects
    Website Source Code
    Website Materials
    Front End Template
    About us Disclaimer Sitemap
    php.cn:Public welfare online PHP training,Help PHP learners grow quickly!