[insert_php]
$servername = “localhost”;
$username = “corvetteex_usr”;
$password = “corvettez06”;
// Create connection
$con = mysqli_connect(“localhost”,”corvetteex_usr”,”corvettez06″,”corvetteex_db”);
if (mysqli_connect_errno()) {
echo “
Failed to connect to MySQL: ” . mysqli_connect_error();
}
else {
// echo “(Connection To Database OK!) ” ;
// $nowtime = date(“Y-m-d H:i:s”);
// $cortime = date(‘Y-m-d H:i:s’, strtotime($nowtime . ‘ + 120 minute’));
// echo $cortime;
// echo ““;
// echo “
“;
}
$h_innr = $_REQUEST[‘search’];
// echo “ID “;
// echo $h_innr;
// echo “
“;
// echo “
“;
$sql = (“SELECT * ”
.”FROM reservations ”
.”WHERE id = ‘”.$h_innr.”‘ ”
) ;
$result = mysqli_query($con,$sql);
switch (mysqli_num_rows($result)) {
case 0 : echo (“Reservation Id :”.$h_innr.” does not exist.”) ; die;
break ;
case 1 :
break ;
default : echo (“Multiple reservations with Id :”.$h_innr.” found.”) ; die;
}
$row = mysqli_fetch_array($result) ;
$h_status = $row[‘status’];
$h_auto = $row[‘auto’];
$h_id = $row[‘id’];
switch ($_POST[’taal’]) {
case “Francais”:
echo “
Vous avez réservé avec les informations suivantes :
” ;
$h_id = $row[‘id’]; echo “ID de reservation : “.$h_id.”
” ;
$h_datum= $row[‘datum’]; echo “Date : “.$h_datum.”
” ;
$h_uur = $row[‘uur’]; echo “Heure : “.$h_uur.”
” ;
$h_taal = $_POST[’taal’]; echo “Langue : “.$h_taal.”
” ;
$h_pilo = $_POST[“pilo”]; echo “Pilot/Passager : “.$h_pilo.”
” ;
$h_vona = $_POST[‘vona’]; echo “Prénom : “.$h_vona.”
” ;
$h_acna = $_POST[‘acna’]; echo “Nom de famille : “.$h_acna.”
” ;
$h_adre = $_POST[“adre”]; echo “Adresse : “.$h_adre.”
” ;
$h_ponr = $_POST[“ponr”]; echo “Numéro postal : “.$h_ponr.”
” ;
$h_plts = $_POST[“plts”]; echo “Ville : “.$h_plts.”
” ;
$h_land = $_POST[“land”]; echo “Pays : “.$h_land.”
” ;
$h_gsmn = $_POST[“gsmn”]; echo “Téléphone : “.$h_gsmn.”
” ;
$h_emai = $_POST[“emai”]; echo “Email : “.$h_emai.”
” ;
$h_gdat = $_POST[“gdat”]; echo “Date de naissance : “.$h_gdat.”
” ;
$h_form = $_POST[“form”]; echo “Formule : “.$h_form.”
” ;
$h_bonn = $_POST[“bonn”]; echo “Numéro de bon : “.$h_bonn.”
” ;
$h_verv = $_POST[“verv”]; echo “Date d’expiration bon : “.$h_verv.”
” ;
$h_opme = $_POST[“opme”]; echo “Note : “.$h_opme.”
” ;
echo “
Appuyez sur OK pour confirmer votre réservation.
” ;
break;
case “English”:
echo “
You made a reservation with the following information :
” ;
$h_id = $row[‘id’]; echo “Reservation ID : “.$h_id.”
” ;
$h_datum= $row[‘datum’]; echo “Date : “.$h_datum.”
” ;
$h_uur = $row[‘uur’]; echo “Hour : “.$h_uur.”
” ;
$h_taal = $_POST[’taal’]; echo “Language : “.$h_taal.”
” ;
$h_pilo = $_POST[“pilo”]; echo “Pilot/Passenger : “.$h_pilo.”
” ;
$h_vona = $_POST[‘vona’]; echo “First Name : “.$h_vona.”
” ;
$h_acna = $_POST[‘acna’]; echo “Last Name : “.$h_acna.”
” ;
$h_adre = $_POST[“adre”]; echo “Address : “.$h_adre.”
” ;
$h_ponr = $_POST[“ponr”]; echo “Zip Code : “.$h_ponr.”
” ;
$h_plts = $_POST[“plts”]; echo “City : “.$h_plts.”
” ;
$h_land = $_POST[“land”]; echo “Country : “.$h_land.”
” ;
$h_gsmn = $_POST[“gsmn”]; echo “Phone : “.$h_gsmn.”
” ;
$h_emai = $_POST[“emai”]; echo “Email : “.$h_emai.”
” ;
$h_gdat = $_POST[“gdat”]; echo “Date of birth : “.$h_gdat.”
” ;
$h_form = $_POST[“form”]; echo “Formula : “.$h_form.”
” ;
$h_bonn = $_POST[“bonn”]; echo “Voucher number : “.$h_bonn.”
” ;
$h_verv = $_POST[“verv”]; echo “Expiration date voucher : “.$h_verv.”
” ;
$h_opme = $_POST[“opme”]; echo “Remark : “.$h_opme.”
” ;
echo “
Press OK to confirm your reservation.
” ;
break;
default:
echo “
U reserveerde met volgende gegevens :
” ;
$h_id = $row[‘id’]; echo “Reservatie ID : “.$h_id.”
” ;
$h_datum= $row[‘datum’]; echo “Datum : “.$h_datum.”
” ;
$h_uur = $row[‘uur’]; echo “Uur : “.$h_uur.”
” ;
$h_taal = $_POST[’taal’]; echo “Taal : “.$h_taal.”
” ;
$h_pilo = $_POST[“pilo”]; echo “Piloot/Passagier : “.$h_pilo.”
” ;
$h_vona = $_POST[‘vona’]; echo “Voornaam : “.$h_vona.”
” ;
$h_acna = $_POST[‘acna’]; echo “Achternaam : “.$h_acna.”
” ;
$h_adre = $_POST[“adre”]; echo “Adres : “.$h_adre.”
” ;
$h_ponr = $_POST[“ponr”]; echo “Postnummer : “.$h_ponr.”
” ;
$h_plts = $_POST[“plts”]; echo “Plaats : “.$h_plts.”
” ;
$h_land = $_POST[“land”]; echo “Land : “.$h_land.”
” ;
$h_gsmn = $_POST[“gsmn”]; echo “Telefoon : “.$h_gsmn.”
” ;
$h_emai = $_POST[“emai”]; echo “E-Mail : “.$h_emai.”
” ;
$h_gdat = $_POST[“gdat”]; echo “Geboortedatum : “.$h_gdat.”
” ;
$h_form = $_POST[“form”]; echo “Formule : “.$h_form.”
” ;
$h_bonn = $_POST[“bonn”]; echo “Bonnummer : “.$h_bonn.”
” ;
$h_verv = $_POST[“verv”]; echo “Vervaldatum bon : “.$h_verv.”
” ;
$h_opme = $_POST[“opme”]; echo “Opmerking : “.$h_opme.”
” ;
echo “
Druk OK om je reservatie te bevestigen.
” ;
}
echo “
“;
[/insert_php]