Code:
[...]httpd.www/database.php(4): PDO->__construct([...]
[...]httpd.www/database.php(4): PDO->__construct([...]
[16-Feb-2018 10:57:14 UTC] PHP Fatal error: Uncaught PDOException: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'tag' cannot be null in /customers/5/5/f/tages-jobs.com/httpd.www/action.php:27 Stack trace: #0 /customers/5/5/f/tages-jobs.com/httpd.www/action.php(27): PDOStatement->execute(Array) #1 {main} thrown in /customers/5/5/f/tages-jobs.com/httpd.www/action.php on line 27
$titel = $_POST["item_name"]; $tag = $_POST["os0"]; $monat = $_POST["os1"]; $jahr = $_POST["os2"]; $land = $_POST["os3"]; $plz = $_POST["address_zip"]; $ort = $_POST["address_city"]; $dauer = $_POST["height_unit"]; $lohn = $_POST["width_unit"]; $beschreibung = $_POST["custom"]; $kontakt_email = $_POST["payer_email"]; $kontakt_tel = $_POST["contact_phone"]; $kdnr = $_SESSION['id']; $datum = date('y-m-d'); $statement = $pdo->prepare("INSERT INTO angebote (id, titel, tag, monat, jahr, land, plz, arbeits_ort, dauer, lohn, beschreibung, kontakt_email, kontakt_tel, kdnr, datum) VALUES ('', :titel, :tag, :monat, :jahr, :land, :plz, :arbeits_ort, :dauer, :lohn, :beschreibung, :kontakt_email, :kontakt_tel, :kdnr, :datum)"); $result = $statement->execute(array('titel' => $titel, 'tag' => $tag, 'monat' => $monat, 'jahr' => $jahr, 'land' => $land, 'plz' => $plz, 'arbeits_ort' => $ort, 'dauer' => $dauer, 'lohn' => $lohn, 'beschreibung' => $beschreibung, 'kontakt_email' => $kontakt_email, 'kontakt_tel' => $kontakt_tel, 'kdnr' => $kdnr, 'datum' => $datum));
<?php
session_start();
error_reporting(E_ALL);
ini_set ('display_errors', 1); // 1 = show error messages in the browser, 0 = hide them
ini_set('log_errors',true);
ini_set('error_log','/customers/5/5/f/tages-jobs.com//httpd.www/PHP_errors.log');
include("database.php");
$titel = $_POST["item_name"];
$tag = $_POST["option_selection1"];
$monat = $_POST["option_selection2"];
$jahr = $_POST["option_selection3"];
$land = $_POST["option_selection4"];
$plz = $_POST["address_zip"];
$ort = $_POST["address_city"];
$dauer = $_POST["option_selection5"];
$lohn = $_POST["option_selection6"];
$beschreibung = $_POST["custom"];
$kontakt_email = $_POST["payer_email"];
$kontakt_tel = $_POST["option_selection7"];
$kdnr = $_SESSION['id'];
$datum = date('y-m-d');
$statement = $pdo->prepare("INSERT INTO angebote (id, titel, tag, monat, jahr, land, plz, arbeits_ort, dauer, lohn, beschreibung, kontakt_email, kontakt_tel, kdnr, datum) VALUES ('', :titel, :tag, :monat, :jahr, :land, :plz, :arbeits_ort, :dauer, :lohn, :beschreibung, :kontakt_email, :kontakt_tel, :kdnr, :datum)");
$result = $statement->execute(array('titel' => $titel, 'tag' => $tag, 'monat' => $monat, 'jahr' => $jahr, 'land' => $land, 'plz' => $plz, 'arbeits_ort' => $ort, 'dauer' => $dauer, 'lohn' => $lohn, 'beschreibung' => $beschreibung, 'kontakt_email' => $kontakt_email, 'kontakt_tel' => $kontakt_tel, 'kdnr' => $kdnr, 'datum' => $datum));
?>
$kdnr = $_SESSION['id'];
setcookie("kdnr", $kdnr);
<?php
session_start();
error_reporting(E_ALL);
ini_set ('display_errors', 1); // 1 = show error messages in the browser, 0 = hide them
ini_set('log_errors',true);
ini_set('error_log','/customers/5/5/f/tages-jobs.com//httpd.www/PHP_errors.log');
include("database.php");
$titel = $_POST["item_name"];
$tag = $_POST["option_selection1"];
$monat = $_POST["option_selection2"];
$jahr = $_POST["option_selection3"];
$land = $_POST["option_selection4"];
$plz = $_POST["address_zip"];
$ort = $_POST["address_city"];
$dauer = $_POST["option_selection5"];
$lohn = $_POST["option_selection6"];
$beschreibung = $_POST["custom"];
$kontakt_email = $_POST["payer_email"];
$kontakt_tel = $_POST["option_selection7"];
$kdnr = $_COOKIE["kdnr"];
$datum = date('y-m-d');
$aktiv = "true";
$statement = $pdo->prepare("INSERT INTO angebote (id, titel, tag, monat, jahr, land, plz, arbeits_ort, dauer, lohn, beschreibung, kontakt_email, kontakt_tel, kdnr, datum, aktiv) VALUES ('', :titel, :tag, :monat, :jahr, :land, :plz, :arbeits_ort, :dauer, :lohn, :beschreibung, :kontakt_email, :kontakt_tel, :kdnr, :datum, :aktiv)");
$result = $statement->execute(array('titel' => $titel, 'tag' => $tag, 'monat' => $monat, 'jahr' => $jahr, 'land' => $land, 'plz' => $plz, 'arbeits_ort' => $ort, 'dauer' => $dauer, 'lohn' => $lohn, 'beschreibung' => $beschreibung, 'kontakt_email' => $kontakt_email, 'kontakt_tel' => $kontakt_tel, 'kdnr' => $kdnr, 'datum' => $datum, 'aktiv' => $aktiv));
?>
Kommentar