My problem is that, i have 3 products from DB. 1 product is supposed to have disabled button, but in total all 3 of them have disabled button which is wrong. I echoed the value of "$dss2" and found that it only calls for 1 product shown below here in my picture link.
$dss2 is supposed to have different value based on its product
I don't know the problem, because these codes are inside my fetching from the database loop. It would helped me a lot. Been working for this error for days..

This is my code for fetching the product's details that is inside the fetching from data loop:
<?php
include('connectdb.php');
$sql = "SELECT * from posted WHERE (seller='$userid') and (prod='$produkto') and (activityset='GROUP') and (datee = '$araw')";
$result = $conn->query($sql);
if ($result->num_rows > 0) {
$result = $conn->query($sql); ?>
<?php while($data = $result->fetch_assoc()) {
$dc = $data["dateclick"];
**$dss2 = $data["datestart"];**
$equaldate = $data["datee"];
$as2 = $data["activityset"];
}} ?>
This is my button code:
<!-- Group -->
<?php
if ($produkto == $row['cartname']) {
if ($dss2 > $datetoday) { ?>
<button type="button" class="btn btn-info btn-sm" title="Return after 1-2 hours" data-toggle="modal" data-target="#modal-4" disabled>Group <?php echo $groupcount ?>/3</button>
<?php }
else { ?>
<button type="button" class="btn btn-info btn-sm" title="Return after 1-2 hours" data-toggle="modal" data-target="#modal-4" disabled>Group <?php echo $dss2 ?><?php echo $groupcount ?>/3</button>
<?php } } ?>
Button code are also inside my fetching loop
<or>.3 from where you got$row['cartname']suddenly?