connect_error) { die("Connection failed: " . $conn->connect_error); } // Assume you have a table named 'users' with columns 'name' and 'email' $vorname = $_POST["vorName"]; $nachname = $_POST['nachName']; $strasse = $_POST['strasse']; $hausnummer = $_POST['hausnummer']; $plz = $_POST['postleitzahl']; $ort = $_POST['ort']; $email = $_POST['email']; $passwort = $_POST['passwort']; $kartenid = 1; $id = 1; // Prepare the INSERT statement $stmt = $conn->prepare("INSERT INTO benutzer (VorName, NachName, KartenID, E-MailAdresse,AdressenID, Passwort) VALUES ('". $vorname ."' , '". $nachname ."' ,'". $kartenid ."' , '". $email ."', '". $id ."','". $passwort ."')"); // Execute the statement if ($stmt->execute()) { echo "Data inserted successfully."; } else { echo "Error inserting data: " . $stmt->error; } // Close the statement and connection $stmt->close(); $conn->close(); ?>