Skip to content

Instantly share code, notes, and snippets.

@Whatdapep
Created February 2, 2019 03:13
Show Gist options
  • Save Whatdapep/384e7f8121406db8cf32913a0bcf065b to your computer and use it in GitHub Desktop.
Save Whatdapep/384e7f8121406db8cf32913a0bcf065b to your computer and use it in GitHub Desktop.
<?php
// Create connection
$conn = mysqli_connect("localhost", "root", "","mydb");
mysqli_set_charset($conn,"utf-8");
if ($conn->connect_error) {
echo "error connection database or mysql". $conn->connect_error;
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment