Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Vote Page:
- <html>
- <head>
- <title>Vote For Us!</title>
- </head>
- <body>
- <h3>You Will Recieve 3 Diamonds For Voting For Us!<br>
- To Redeem Your Diamonds Ingame Type: /redeem<br>
- Thanks Guys!
- </h3>
- <form method="post" action="redeem.php">
- <h4>In Game Name:
- <input type="text" name="Player" size="45" /> <br />
- Data input: <input type="text" name="Input" size="45" /> <br />
- <input type="submit" value="Vote!" />
- </h4>
- </form>
- </body>
- </html>
- MySQL Script for the site area of the plugin:
- <?php
- //Input correct values into this section
- $dbhost = 'localhost';
- $dbuser = 'mcslaug1_ipboard';
- $dbpass = 'Greece4life';
- $dbname = 'mcslaug1_ipboard';
- $dbtable = 'redeem';
- //---------------------------------------
- $input = $_POST['Input'];
- $player = $_POST['Player'];
- $conn = mysql_connect ($dbhost, $dbuser, $dbpass) or die ('Error: ' . mysql_error());
- mysql_select_db($dbname);
- $query = "INSERT INTO `".$dbname."`.`".$dbtable."` (`player`, `item`) VALUES ('".$player."', '".$input."')";
- mysql_query($query);
- mysql_close($conn);
- echo "Done!";
- ?>
- Config for the plugin:
- MySQL:
- Connection:
- Port: 3306
- Host: localhost
- Database: mc_1415
- Username: mc_1415
- Password: cs7tw45r
- TableName: redeem
Add Comment
Please, Sign In to add comment