prepare($sql);
if ($stmt) {
// Bind the parameter
$stmt->bind_param("i", $trip_id);
// Execute the query
$stmt->execute();
// Get the result
$result = $stmt->get_result();
// Check if the trip exists
if ($result->num_rows > 0) {
// Fetch the data
$row = $result->fetch_assoc();
// Populate the variables
$trip_id = $row['trip_id'];
$trip_name = $row['trip_name'];
$location = $row['location'];
$short_description = $row['short_description'];
$long_description = $row['long_description'];
$start_date = $row['start_date'];
$end_date = $row['end_date'];
$capacity = $row['vehicle_capacity'];
$cost_members = $row['cost_members'];
$cost_nonmembers = $row['cost_nonmembers'];
$member_discount = $cost_nonmembers - $cost_members;
$places_booked = $row['places_booked'];
$booking_fee = $row['booking_fee'];
$remaining_places = getAvailableSpaces($trip_id);
// Determine the badge text based on the status
$badge_text = ($remaining_places > 0) ? $remaining_places . ' PLACES LEFT!!' : 'FULLY BOOKED';
// Convert newlines into
tags to preserve line breaks
$formatted_description = nl2br($long_description);
// Wrap the text in
tags at the beginning and end $formatted_description = '
' . $formatted_description . '
'; } else { echo "No trip found with ID: $trip_id"; } // Close the statement $stmt->close(); } else { echo "Error preparing the statement: " . $conn->error; } // Always close the database connection when done $conn->close(); ?>
To take a trivial example which undertakes laborious physical exercise except to obtain some advantage pleasure annoying consequences
The early start ensures you can fully immerse yourself in the tranquility of nature before the world fully awakens. As the morning light filters through the trees, you'll experience the crisp, fresh air and the peaceful sounds of the forest. The trail ahead offers both a physical challenge promise of breathtaking.
To take a trivial example which undertakes laborious physical exercise except to obtain some advantage pleasure annoying consequences
To take a trivial example which undertakes laborious physical exercise except to obtain some advantage pleasure annoying consequences
To take a trivial example which undertakes laborious physical exercise except to obtain some advantage pleasure annoying consequences