Skip to content

Instantly share code, notes, and snippets.

@tps2015gh
Created June 12, 2017 18:57
Show Gist options
  • Save tps2015gh/6e910f81a2d91a9a7af6879505150a3f to your computer and use it in GitHub Desktop.
Save tps2015gh/6e910f81a2d91a9a7af6879505150a3f to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
</head>
<body>
<?php
$db = mysqli_connect("localhost","root","your@password@1234@5678" , "track" );
mysqli_set_charset($db,"utf8");
if(mysqli_connect_errno()){
echo "Failed to connect Mysql: " . mysqli_connect_error() ;
exit();
}else{
echo "Conect Mysql OK";
echo "<br>";
}
$sql = "SELECT * from issue" ;
$q = mysqli_query($db , $sql );
while( $rs = mysqli_fetch_array($q )){
echo " " . $rs['id'];
echo " " . $rs['title'];
echo " status: " . $rs['status'];
echo "<br>";
}
mysqli_close($db);
?>
</body>
</html>
//website to share code with friend
http://collabedit.com/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment