To display MySQL server information in PHP a function mysql_get_server_info() is used. It returns version of MySQL server on success else false.
For example:
<php
//enter your hostname,username and password of mysql
mysql_connect("localhost", "", "") or die("Could not connect: " . mysql_error());
//display server version
printf ("MySQL server version: %s\n", mysql_get_server_info());
?>
0 Comment(s)