Guest User

Untitled

a guest
Feb 19th, 2018
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.27 KB | None | 0 0
  1. Vote Page:
  2.  
  3. <html>
  4. <head>
  5. <title>Vote For Us!</title>
  6. </head>
  7. <body>
  8. <h3>You Will Recieve 3 Diamonds For Voting For Us!<br>
  9. To Redeem Your Diamonds Ingame Type: /redeem<br>
  10. Thanks Guys!
  11. </h3>
  12. <form method="post" action="redeem.php">
  13. <h4>In Game Name:
  14. <input type="text" name="Player" size="45" /> <br />
  15. Data input: <input type="text" name="Input" size="45" /> <br />
  16. <input type="submit" value="Vote!" />
  17. </h4>
  18. </form>
  19. </body>
  20. </html>
  21.  
  22. MySQL Script for the site area of the plugin:
  23.  
  24. <?php
  25. //Input correct values into this section
  26. $dbhost = 'localhost';
  27. $dbuser = 'mcslaug1_ipboard';
  28. $dbpass = 'Greece4life';
  29. $dbname = 'mcslaug1_ipboard';
  30. $dbtable = 'redeem';
  31. //---------------------------------------
  32.  
  33. $input = $_POST['Input'];
  34. $player = $_POST['Player'];
  35. $conn = mysql_connect ($dbhost, $dbuser, $dbpass) or die ('Error: ' . mysql_error());
  36. mysql_select_db($dbname);
  37. $query = "INSERT INTO `".$dbname."`.`".$dbtable."` (`player`, `item`) VALUES ('".$player."', '".$input."')";
  38. mysql_query($query);
  39. mysql_close($conn);
  40. echo "Done!";
  41. ?>
  42.  
  43. Config for the plugin:
  44.  
  45. MySQL:
  46. Connection:
  47. Port: 3306
  48. Host: localhost
  49. Database: mc_1415
  50. Username: mc_1415
  51. Password: cs7tw45r
  52. TableName: redeem
Add Comment
Please, Sign In to add comment