Select Data
$sql = "SELECT $cols FROM $table"; $result = mysqli_query($conn, $sql); if (mysqli_num_rows($result) > 0) { while($row = mysqli_fetch_assoc($result)) { echo $row['col_name']; } } else { echo "0 results"; }
Site yourself
$sql = "SELECT $cols FROM $table"; $result = mysqli_query($conn, $sql); if (mysqli_num_rows($result) > 0) { while($row = mysqli_fetch_assoc($result)) { echo $row['col_name']; } } else { echo "0 results"; }