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