Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. <?php
  2. session_start();
  3. @include('../config/db_conf.php');
  4.  
  5. $conn = mysqli_connect($host, $dbuser, $dbpass, $authdb);
  6.  
  7. $points = $_POST['points'];
  8.  
  9. $sql = "UPDATE account SET vp = vp+$points WHERE username = '" . $_SESSION['username'] . "'";
  10.  
  11. if ($conn->query($sql) === TRUE) {
  12.     header('location: ../?p=vote');
  13. } else {
  14.     echo "Error updating record: " . $conn->error;
  15. }