'; ?>
GIGS connect_error) { die("Connection failed: " . $conn->connect_error); } mysqli_set_charset($conn,"utf8"); $sql = "SELECT * FROM gigs WHERE active = 'yes' AND STR_TO_DATE(date, '%d/%m/%Y') >= CURDATE() ORDER BY STR_TO_DATE(date, '%d/%m/%Y') ASC"; $result = $conn->query($sql); if ($result->num_rows > 0) { // output data of each row while($row = $result->fetch_assoc()) { echo ""; echo "
"; if ($row['date'] != "") { echo "".$row["date"].""; } if ($row['name'] != "") { echo "".$row["name"].""; } if ($row['time'] != "") { echo "Doors Open: ".$row["time"].""; } if ($row['age'] != "") { echo "Age: ".$row["age"].""; } if ($row['price'] != "") { echo "Price: ".$row["price"].""; } if ($row['venue'] != "") { echo "Venue: ".$row["venue"].""; } if ($row['info'] != "") { echo "".$row["info"].""; } if ($row['ticket'] != "") { echo "Buy Tickets"; } else { echo "Order Tickets"; } echo "
"; } } else { echo "


Sorry - no gigs

"; } $conn->close(); ?>