Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $link = mysqli_connect("localhost", "root", "", "pistache");
- if ($link == false){
- die("Konnte nicht verbinden" . mysqli_connect_error());
- }
- $text1 = mysqli_real_escape_string($link, $_POST['text1']);
- $text2 = mysqli_real_escape_string($link, $_POST['text2']);
- $text3 = mysqli_real_escape_string($link, $_POST['text3']);
- $text4 = mysqli_real_escape_string($link, $_POST['text4']);
- $text5 = mysqli_real_escape_string($link, $_POST['text5']);
- $text6 = mysqli_real_escape_string($link, $_POST['text6']);
- $sql = "INSERT INTO pistache_ice (Test1, Test2, Test3, Test4, Test5, Test6) VALUES ('$text1', '$text2', '$text3', '$text4', '$text5')";
- if(mysqli_query($link, $sql)){
- echo "Hat funktioniert";
- } else{
- echo "Hat nicht geklappt. Hier liegt der Fehler: " . mysqli_error($link);
- }
- mysqli_close($link);
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement