Skip to content

Instantly share code, notes, and snippets.

@itswadesh
Last active March 27, 2017 17:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save itswadesh/c4a91a27b28a87e35799266768beff54 to your computer and use it in GitHub Desktop.
Save itswadesh/c4a91a27b28a87e35799266768beff54 to your computer and use it in GitHub Desktop.
<?php
include('../includes/config.php');
$id = $_GET['id'];
$votes = $_GET['votes'];
$query="update posts set votes='$votes' where id='$id'";
$result = $mysqli->query($query) or die($mysqli->error.__LINE__);
// $affected = $mysqli->affected_rows;
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment