//echo round(abs($totime-$fromtime)/60)." Minutes ago";
        $timet = round(abs($totime - $fromtime) / 60, 2);
        if ($timet >= 60) {
            $Hours = round(abs($timet) / 60, 2);
            if ($Hours > 24) {
                $tim = round(abs($Hours) / 24) . " Days ago";
            } else {
                $tim = round(abs($timet) / 60) . " Hours ago";
            }
        } else {
            $tim = round(abs($totime - $fromtime) / 60) . " Minutes ago";
        }
        $data[] = array("Name" => $row126['Name'], "email" => $row126['Email'], "time1" => $tim, "mesg" => $row126['Message'], "pic" => $ppic);
    }
    echo json_encode($data);
}
if (isset($_GET['id'])) {
    $key = $_GET['id'];
    $data = array();
    $result = DisplayAllUsersDetails($key);
    while ($row = $result->fetch_assoc()) {
        $data[] = array("Name" => $row["firstname"], "LName" => $row["lastname"], "email" => $row["email"], "status" => $row["Status"], "address" => $row["address"], "city" => $row["city"], "country" => $row["country"], "stat" => $row["act_status"]);
    }
    echo json_encode($data);
}
if (isset($connection)) {
    mysqli_close($connection);
}
?>

                             <th>Email</th>
                             <th>Address</th>
                             <th>City</th>
                             <th>Country</th>
                             <th>Status</th>
                             <th>Action</th>
                             </th>
                        </tr>
                    </thead>
                    <tbody>
                    <?php 
if (isset($_GET['key'])) {
    $id = htmlentities($_GET['key']);
}
$stat = null;
$result = DisplayAllUsersDetails($_GET['key']);
while ($row = $result->fetch_assoc()) {
    echo "<tr class=\"even pointer\">";
    echo "<td class=\" \">" . $row["firstname"] . "</td>";
    echo "<td class=\" \">" . htmlspecialchars($row["lastname"]) . "</td>";
    echo "<td class=\" \">" . $row["email"] . "</td>";
    echo "<td class=\" \">" . $row["address"] . "</td>";
    echo "<td class=\" \">" . $row["city"] . "</td>";
    echo "<td class=\" \">" . htmlspecialchars($row["country"]) . "</td>";
    echo "<td class=\" \">" . $row["Status"] . "</td>";
    //if($row["act_status"]==="1"){$stat=0;}else{$stat=1;}
    echo "<td class=\" \"><button type=\"button\" class=\"btn btn-primary\" id=\"blockOrunblock\" value=\"" . $row["email"] . "\">";
    if ($row["act_status"] === "1") {
        echo " &nbsp;&nbsp;block&nbsp;&nbsp;";
    } else {
        echo "unblock";