Skip to content

Instantly share code, notes, and snippets.

@nprussell
Created June 14, 2016 09:43
Show Gist options
  • Save nprussell/6e3fdc3152ad5a41f866ab5c0b705a77 to your computer and use it in GitHub Desktop.
Save nprussell/6e3fdc3152ad5a41f866ab5c0b705a77 to your computer and use it in GitHub Desktop.
<?php include 'db.php';
try{
if(isset($_GET['makelive'])){
$index = $_GET['makelive'];
$query = $connection->prepare("
UPDATE version SET live = :live
WHERE _index = :index
");
$query->execute([
'live'=>1,
'index'=>$index
]);
}
echo "Query Complete";
} catch (PDOException $e) {
die("Query failed");
}
//header("Location: ../version.php");
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment