setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $stmt = $conn->prepare("SELECT * FROM business_verticals"); $stmt->execute(); $rows = $stmt->fetchAll(PDO::FETCH_ASSOC); if (count($rows) >= 1) { foreach($rows as $row){ echo '
'.$row['bv'].'
'; } } else { echo "

Not Found any Data

"; } } catch (PDOException $e) { echo "

Error: " . $e->getMessage() . "

"; } ?>
setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $accessArray = explode(",", $_SESSION['access']); $placeholders = rtrim(str_repeat('?,', count($accessArray)), ','); // Creating placeholders like ?,?,?,? $stmt = $conn->prepare("SELECT * FROM cleads WHERE business_type IN ($placeholders)"); foreach ($accessArray as $key => $value) { $stmt->bindValue($key + 1, $value); } $stmt->execute(); $rows = $stmt->fetchAll(PDO::FETCH_ASSOC); $num_rows = $stmt->rowCount(); if ($num_rows >= 1) { foreach($rows as $row){ echo ' '; } } else{ echo "

Not Found any Data

"; } } catch (PDOException $e) { echo "

Error: " . $e->getMessage() . "

"; } ?>
Name ID Status Email Phone business_type Time Action
'.$row['name'].' '.$row['id'].' '.$row['status'].' '.$row['email'].' '.$row['phone'].' '.$row['business_type'].' '.$row['time'].' Delete