Skip to content

Instantly share code, notes, and snippets.

@peerapongsam
Created March 1, 2016 03:22
Show Gist options
  • Save peerapongsam/2d8c6b2dbf79b04c9e2c to your computer and use it in GitHub Desktop.
Save peerapongsam/2d8c6b2dbf79b04c9e2c to your computer and use it in GitHub Desktop.
mysql_test.php
<?php
$conn = mysqli_connect('localhost', 'root', '12345678', 'test');
mysqli_set_charset($conn, 'utf8');
$result = mysqli_query($conn, 'SELECT * FROM province;');
if ($result) {
while ($row = mysqli_fetch_assoc($result)) {
echo $row['PROVINCE_NAME'].'<br>';
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment