Welcome, guest! Login / Register - Why register?
Psst.. new poll here.
Psst.. new forums here.
Microsoft is blocking us again (TY IP Reputation!) so just use oauth login instead. :)

Paste

Pasted as PHP by klinsi ( 16 years ago )
session_start();
 $link = connect_to_db();

 // Kontaktdaten einpflegen
 $sql0 = "INSERT INTO man_contact (id, firstname, lastname, company, email, phone, acceptance, regdate) VALUES ('', '" . $_SESSION['cfirstname'] . "', '" . $_SESSION['clastname']  . "', '" . $_SESSION['company'] . "', '" . $_SESSION['email'] . "', '" . $_SESSION['phone'] . "', '" . $_SESSION['acceptance'] . "', NOW());";
 mysql_query($sql0, $link);

 // ID von Kontaktdaten
 $contact_id = mysql_insert_id($link);

 // Hauptteilnehmer einpflegen
 $sql1 = "INSERT INTO man_guests (id, firstname, lastname, room, " . $date0_0 . $date1_0 . "tour, tour_lang, arrival, contact_id) VALUES ('', '" . $_SESSION['cfirstname'] . "', '" . $_SESSION['clastname'] . "', '" . $_POST['croom'] . "', '" . $date0_1 . $date1_1 . "'" . $_SESSION['tour'] . "', '" . $_SESSION['tour_lang'] . "', '" . $_SESSION['arrival'] . "', '" . $contact_id . "');";
 mysql_query($sql1, $link);

 // Ersten weiteren Teilnehmer einpflegen
 if(!empty($_SESSION['g0firstname']) && !empty($_SESSION['g0lastname'])) {
  $sql2 = "INSERT INTO man_guests (id, firstname, lastname, room, " . $date2_0 . $date3_0 . "tour, tour_lang, arrival, contact_id) VALUES ('', '" . $_SESSION['g0firstname'] . "', '" . $_SESSION['g0lastname'] . "', '" . $_POST['g0room'] . "', " . $date2_1 . $date3_1 . "'" . $_SESSION['tour'] . "', '" . $_SESSION['tour_lang'] . "', '" . $_SESSION['arrival'] . "', '" . $contact_id . "');";
  mysql_query($sql2, $link);
 }

 // Zweiten weiteren Teilnehmer einpflegen
 if(!empty($_SESSION['g1firstname']) && !empty($_SESSION['g1lastname'])) {
  $sql3 = "INSERT INTO man_guests (id, firstname, lastname, room, " . $date4_0 . $date5_0 . "tour, tour_lang, arrival, contact_id) VALUES ('', '" . $_SESSION['g1firstname'] . "', '" . $_SESSION['g1lastname'] . "', '" . $_POST['g1room'] . "', '" . $date4_1 . $date5_1 . "'" . $_SESSION['tour'] . "', '" . $_SESSION['tour_lang'] . "', '" . $_SESSION['arrival'] . "', '" . $contact_id . "');";
  mysql_query($sql3, $link);
 }

 disconnect_from_db($link);

 

Revise this Paste

Your Name: Code Language: