<?php
/* Open a connection */
$maxdb = new maxdb("localhost", "MONA", "RED", "DEMODB");
/* check connection */
if (maxdb_connect_errno()) {
printf("Connect failed: %s\n", maxdb_connect_error());
exit();
}
/* Print current character set */
$charset = $maxdb->character_set_name();
printf ("Current character set is %s\n", $charset);
$maxdb->close();
?>