Skip to content

Instantly share code, notes, and snippets.

@vitqst
Last active September 12, 2015 09:16
Show Gist options
  • Save vitqst/a65408418b9bc8a3d86a to your computer and use it in GitHub Desktop.
Save vitqst/a65408418b9bc8a3d86a to your computer and use it in GitHub Desktop.
<?php
$host = "localhost"; // host name ...
$user = "root"; // username database
$pass = ""; // pass database
$database = "vietbook"; // choose database
$connection = mysqli_connect($host, $user, $pass, $database) or die('cant connect');
mysqli_query($connection, "SET NAMES 'utf8'"); // importance !
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment