Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- if(isset($_POST['submit'])) {
- $error = "";
- $title = $_POST['title'];
- $singer = $_POST['singer'];
- if (!$error) {
- if ($title != "" && $singer != "") {
- $stmt = $con->prepare("INSERT INTO DATABASE (title, singer) VALUES (:title, :singer)");
- $stmt->bindValue(':title', $title);
- $stmt->bindValue(':singer', $singer);
- $result = $stmt->fetch();
- if ($result == false) {
- $error = "Bitte fülle alle Felder aus!";
- } else {
- if (isset($result)) {
- $successfully = "Successfully";
- }
- }
- }
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement