Skip to content

Instantly share code, notes, and snippets.

@ButlerFuqua
Created April 3, 2019 09:25
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 ButlerFuqua/e24ea9bf74d9ed337e7e17b8a7f6ba64 to your computer and use it in GitHub Desktop.
Save ButlerFuqua/e24ea9bf74d9ed337e7e17b8a7f6ba64 to your computer and use it in GitHub Desktop.
<?php
$link = mysqli_connect("HOST", "USERNAME", "PASSWORD", "DATABASE");
if(mysqli_connect_error()){
die("There was an error connecting to the database.");
}
//$query = "INSERT INTO users (`email`, `password`) VALUES('tommy@gmail.com', 'pass')";
// $query = "UPDATE `users` SET email = 'person@gmail.com' WHERE id = 1 LIMIT 1";
$query = "UPDATE `users` SET password = 'newPass' WHERE email = 'person@gmail.com' LIMIT 1";
mysqli_query($link, $query);
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment