MOD: Beitrag wiederhergestellt
Heyy Leute,
Ich bekomme die ganze Zeit folgenden Fehler:
Fatal error: Uncaught PDOException: SQLSTATE[HY093]: Invalid parameter number: number of bound variables does not match number of tokens in VERZEICHNIS
PDOStatement->execute(Array) #1 {main} thrown in VERZEICHNIS
Sieht ihr irgendwo ein Fehler ?
Ahja habe auch bei MySQL alles auf Text gesetzt.
Ich bekomme die ganze Zeit folgenden Fehler:
Fatal error: Uncaught PDOException: SQLSTATE[HY093]: Invalid parameter number: number of bound variables does not match number of tokens in VERZEICHNIS
PDOStatement->execute(Array) #1 {main} thrown in VERZEICHNIS
Sieht ihr irgendwo ein Fehler ?
Ahja habe auch bei MySQL alles auf Text gesetzt.
HTML-Code:
<form action="eintrag_ausgaben.php" method="get"> <p align="left"><h3>Rechnungseingänge:</h3></p> <input class="eintrag_input" name="datum" type="text" placeholder="Datum" size="30"/><br> <input class="eintrag_input" name="rg_nummer" type="text" placeholder="Rechnungsnummer" size="30"/><br> <input class="eintrag_input" name="lieferant" type="text" placeholder="Name des Lieferanten" size="30"/><br> <h3>Ausgabentyp</h3> <select name="typ" class="eintrag_input" placeholder="Ausgabentyp"> <option name="ware">Ware</option> <option name="inventar">Inventar</option> <option name="sonstiges">Sonstiges</option> </select><br> <h3>MwSt. Frei ?</h3> <select name="mwst_frei" class="eintrag_input" placeholder"MWST Frei?"> <option name="ja">JA</option> <option name="nein">NEIN</option> </select><br> <input class="eintrag_input" name="total" type="text" placeholder="Total (€)" size="30"/> <input class="eintrag_input" name="zahlungsziel" type="text" placeholder="Zahlungsziel (dd.mm.yy)" size="30"/><br> <h3>Zahlungsweise</h3> <select name="gezahlt" class="eintrag_input" placeholder"Zahlungsweise"> <option name="bnp">Banküberweisung</option> <option name="visa">VISA</option> <option name="bar">Bar</option> </select><br> <h3>Land wo die Zahlung eingeht</h3> <select name="ausland" class="eintrag_input" placeholder"Land"> <option name="belgien">Belgien</option> <option name="deutschland">Deutschland</option> <option name="china">China</option> <option name="tschechien">Tschechien</option> </select><br>
PHP-Code:
< ?php
$datum = $_GET ["datum"];
$rg_nummer = $_GET ["rg_nummer"];
$total = $_GET ["total"];
$lieferant = $_GET ["lieferant"];
$typ = $_GET ["typ"];
$mwst_frei = $_GET ["mwst_frei"];
$mwst = $_GET ["mwst"];
$zahlungsziel = $_GET ["zahlungsziel"];
$gezahlt = $_GET ["gezahlt"];
$ausland = $_GET ["ausland"];
?>
< ?php $pdo = include "db/mysql.php"; ?>
<?php
$statement = $db->prepare("INSERT INTO ausgaben (datum, rg_nummer, total, lieferant, typ, mwst_frei, mwst, zahlungsziel, gezahlt, ausland)
VALUES (?, ?, ?, ?, ?, ?)");
$statement->execute(array("$datum", "$rg_nummer", "$total", "$lieferant", "$typ", "$mwst_frei", "$mwst", "$zahlungsziel", "$gezahlt", "$ausland"));
?>
Kommentar