set_charset("utf8mb4"); $trainingId = $_GET['training_id']; $sql = "SELECT * FROM tb_trainings WHERE training_id = ?"; $stmt = $conn->prepare($sql); $stmt->bind_param("i", $trainingId); $stmt->execute(); $result = $stmt->get_result(); if ($result->num_rows > 0) { $array = $result->fetch_assoc(); echo '
' . htmlspecialchars($array["training_title"], ENT_QUOTES, 'UTF-8') . '
' . htmlspecialchars($array["training_type"], ENT_QUOTES, 'UTF-8') . '
Project ' . htmlspecialchars($array[
'; echo '

'. $array["training_title"] .' was a '. $array["training_type"] .' workshop run in '. $array["training_location"] .', '. $array["training_country"] .'. The workshop involved '. $array["no_participants"] .' and was run by GEA trainer '. $array["lead_trainer"] .'

'; // Loop through the available photos (up to 5) for ($i = 0; $i <= 6; $i++) { $photo_main_field = "training_photo" . $i . "_main"; $photo_tmb_field = "training_photo" . $i . "_tmb"; // Retrieve the photo paths from the array $photo_main = $array[$photo_main_field]; $photo_tmb = $array[$photo_tmb_field]; // Check if the photo exists if (!empty($photo_main) && !empty($photo_tmb)) { echo '
'; } } echo '
'; if (!empty($array["training_summary"])) { echo '

Training Summary

'. $array["training_summary"] .'


'; } if (!empty($array["training_agenda"])) { echo '

Training Agenda

'. $array["training_agenda"] .'


'; } if (!empty($array["training_success"])) { echo '

Success Story

'. $array["training_success"] .'


'; } if (!empty($array["training_challenges"])) { echo '

Challenges

'. $array["training_challenges"] .'


'; } if (!empty($array["training_lessons_learned"])) { echo '

Lessons Learned

'. $array["training_lessons_learned"] .'


'; } echo '



Global Ecobrick Alliance Workshops & Trainings

Check out our currently available ecobrick, earthen and regenerative courses on our GoBrik app:

A listing of our current course options

'; } else { echo '
'; echo 'Sorry! :-(
There are no results for a training with the id of '. $trainingId .' in our database.
empty ecobrick


🚧 It seems training '. $trainingId .' has not been published to the ecobricks.org database. This could be because of a publication error. It could also be because the training ID is mis-entered in the URL.




Training Location:

' . $array["location_full"] . '





Global Ecobrick Alliance Workshops & Trainings

Check out our currently available ecobrick, earthen and regenerative courses on our GoBrik app:

🔎 Find a Course

A listing of our current course options

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