PHP code defining variable sqlshowvalue
$sqlshowvalue = 5;
if(isset($_POST[\'showmore\'])) {
$sqlshowvalue += 5;
}
So I connect to my
Have you tried making
$result = mysqli_query($conn,"SELECT * FROM comments ORDER BY id DESC limit '$sqlshowvalue'");
to
$result = mysqli_query($conn,"SELECT * FROM comments ORDER BY id DESC limit ".$sqlshowvalue);
Remove ''
use only $sqlshowvalue
:-
$result = mysqli_query($conn,"SELECT * FROM comments
ORDER BY id DESC limit $sqlshowvalue");
for integer value no need of ''