<?php
$link = maxdb_connect("localhost", "MONA", "RED", "DEMODB");
/* check connection */
if (maxdb_connect_errno()) {
printf("Connect failed: %s\n", maxdb_connect_error());
exit();
}
/* print host information */
printf("Host info: %s\n", maxdb_get_host_info($link));
/* close connection */
maxdb_close($link);
?>