Wenn ich versuche, Daten von einem HTML-Formular zu einer Datenbank mit PHP zu senden, bekomme ich error unexpected ; in line 6
. Ich kann die genaue Ursache nicht finden.Senden Formularwerte zu Db-Fehler
Dies ist der Code von send.php:
<?php
//Connecting to sql db.
$connect = mysqli_connect("host","user","password","database");
//Sending form data to sql db.
mysqli_query($connect,"INSERT INTO sw5_green (firstname_r, lastname_r, vid, occupation, address, firstname_s, lastname_s, country, amount, currency)
VALUES ('$_POST[post_firstname_r]', '$_POST[post_lastname_r]', '$_POST[post_vid]', '$_POST[post_occupation]', '$_POST[post_address]', '$_POST[post_firstname_s]', '$_POST[post_lastname_s]', '$_POST[post_country]', '$_POST[post_amount]', '$_POST[post_currency]')";
?>
Danke :) Es hat funktioniert – Haf833