Suggest a feature
×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: PHP
Posted by: Peter Vondracek
Added: Apr 16, 2018 2:45 PM
Views: 25
Tags: no tags
  1. $con=mysqli_connect('localhost','root','toor','database');
  2.    
  3.     // Check connection
  4.     {
  5.         echo "Failed to connect to MySQL: " . mysqli_connect_error();
  6.     }
  7.     mysqli_query($con, "SET NAMES 'utf8'");