Advertisement
Guest User

Untitled

a guest
Apr 13th, 2024
150
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.76 KB | None | 0 0
  1. <?php
  2. // ? DATABASE FOR THE UPLOADED MANGA
  3. $servername = "localhost"; // Change this to your server name if different
  4. $username = "root"; // Change this to your MySQL username
  5. $password = ""; // Change this to your MySQL password if you have set one
  6. $database = "mangabato"; // Change this to your database name
  7.  
  8. $title = $_POST['title'];
  9. // connect to UPLOAD MANGA DATABASE
  10. $conn = new mysqli($servername, $username, $password, $database);
  11. if ($conn->connect_error) {
  12. die('Connection failed : ' . $conn->connect_error);
  13. } else {
  14. $stmt = $conn->prepare("INSERT INTO upload_manga(title) VALUES (?)");
  15. $stmt->bind_param("s", $title);
  16. $stmt->execute();
  17. echo "Manga uploaded successfully...";
  18. $stmt->close();
  19. $conn->close();
  20. }
  21. ?>
  22.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement