Skip to content

Instantly share code, notes, and snippets.

@MN-dev
Created November 8, 2016 07:04
Show Gist options
  • Save MN-dev/59214ff3106cb1a0d65b7eb126416c75 to your computer and use it in GitHub Desktop.
Save MN-dev/59214ff3106cb1a0d65b7eb126416c75 to your computer and use it in GitHub Desktop.
ss
<?php
function connect(){
$host = "localhost";
$user = "root";
$pass = "";
$dbname = "pami1";
$con = mysqli_connect($host,$user,$pass,$dbname);
if ($con) {
return $con;
# code...
}else{
die('ERROR connection from $con : '.mysqli_connect_error);
}
}// end function connect
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment