Advertisement
Guest User

Untitled

a guest
Mar 21st, 2016
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.76 KB | None | 0 0
  1. <html>
  2. <body>
  3.  
  4. Bot Created With The Name : <?php echo $_GET["botname"]; ?><br>
  5.  
  6.  
  7. <?php
  8. $servername = "localhost";
  9. $username = "root";
  10. $password = "";
  11. $dbname = "Bots";
  12. // Create connection
  13. $conn = new mysqli($servername, $username, $password, $dbname);
  14. // Check connection
  15. if ($conn->connect_error) {
  16. die("Connection failed: " . $conn->connect_error);
  17. }
  18.  
  19. // sql to create table
  20. $sql = "CREATE TABLE botname (
  21. id INT(6) UNSIGNED AUTO_INCREMENT PRIMARY KEY,
  22. firstname VARCHAR(30) NOT NULL,
  23. lastname VARCHAR(30) NOT NULL,
  24. email VARCHAR(50),
  25. reg_date TIMESTAMP
  26. )";
  27.  
  28. if ($conn->query($sql) === TRUE) {
  29. echo "Bot created successfully";
  30. } else {
  31. echo "Error creating table: " . $conn->error;
  32. }
  33.  
  34. $conn->close();
  35. ?>
  36.  
  37. </body>
  38. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement