Created
January 8, 2012 14:27
-
-
Save dominikzogg/1578531 to your computer and use it in GitHub Desktop.
very simple mysql encoding tester written in php
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//header('content-type: text/html; charset=latin1'); | |
header('content-type: text/html; charset=utf8'); | |
$connection['host'] = "localhost"; | |
$connection['username'] = ""; | |
$connection['password'] = ""; | |
$connection['database'] = ""; | |
// *************************************** | |
if(!$link = mysql_connect($connection['host'], $connection['username'], $connection['password'])) | |
{ | |
die(mysql_error()); | |
} | |
// *************************************** | |
if(!$db = mysql_select_db($connection['database'], $link)) | |
{ | |
die (mysql_error()); | |
} | |
// *************************************** | |
$result = mysql_query("SELECT * FROM fe_page", $link); | |
while($row = mysql_fetch_assoc($result)) | |
{ | |
print_r($row); | |
} | |
// *************************************** | |
mysql_close($link); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment