<?php require 'conn.php'; //get values $vorname = $_POST["vorname"]; $nachname = $_POST["nachname"]; $email = $_POST["email"]; //insert data into mysql $sql="INSERT INTO testtbl(vorname, nachname, email)VALUES('$vorname', '$nachname', '$email')"; if (mysqli_query($conn, $sql)){ echo "New record created"; sleep(0); header('location: http://centifa.cqt24.ch/db/'); exit; } else{ echo "error"; } $conn->close(); ?>