Advertisement
Guest User

Untitled

a guest
Jul 10th, 2017
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.48 KB | None | 0 0
  1. <?php
  2. $username='litesoft_vote';
  3. $password='noszscape1994';
  4. $database='litesoft_vote';
  5. $host='localhost';
  6.  
  7.  
  8. if(isset($_GET['ip'])){
  9. mysql_connect($host,$username,$password);
  10. @mysql_select_db($database) or die( "Unable To Connect To Database $database");
  11. $incentive = stripslashes(mysql_escape_string($_GET['ip']));
  12. $ip = $_SERVER["REMOTE_ADDR"];
  13. $sql = "INSERT INTO `voted` (`id`, `ip`) VALUES ('$incentive', '$ip');";
  14. mysql_query($sql);
  15.  
  16. } else {
  17.  
  18. echo "Not set";
  19. }
  20.  
  21. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement