Advertisement
Guest User

Untitled

a guest
Apr 26th, 2017
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.82 KB | None | 0 0
  1. <?php
  2.  
  3. //Connect to the database
  4. $host = "127.0.0.1";
  5. $user = "grubsteak"; //Your Cloud 9 username
  6. $pass = ""; //Remember, there is NO password by default!
  7. $db = "bans"; //Your database name you want to connect to
  8. $port = 3306; //The port #. It is always 3306
  9.  
  10. $connection = mysqli_connect($host, $user, $pass, $db, $port)or die(mysql_error());
  11.  
  12.  
  13. if($_GET["id"])
  14. {
  15. $query = "INSERT INTO banned (id, bantype) VALUES (" . $_GET["id"] . ", " . $_GET["bantype"] . ")";
  16. echo mysqli_query($connection, $query);
  17. echo $query . "<br />";
  18. echo $_GET["id"] . ", " . $_GET["bantype"] . "<br />";
  19. echo "success";
  20. }
  21. else
  22. {
  23. echo "error";
  24. }
  25.  
  26. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement