Suggest a feature
×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: PHP
Posted by: Andreas Lindner
Added: Apr 11, 2018 5:34 AM
Views: 16
Tags: no tags
  1. // GRANT ALL ON `database`.* TO `user`@'localhost' IDENTIFIED BY 'password';
  2. $dbConnection = mysqli_connect('host', 'user', 'password', 'database');
  3.  
  4.     echo 'ERR';
  5.     exit;
  6. }
  7.  
  8. mysqli_set_charset($dbConnection, "utf8");
  9.  
  10. $trash = mysqli_query($dbConnection, "INSERT INTO `table` (`col1`, `col2`) VALUES ('value1', 'value2');") or die(mysqli_error());
  11.  
  12. mysqli_close($dbConnection);