If you have a php script with mysql connectivity function called, and it not showing any ouput/error in the browser. then check /var/log/apache2/error.log (this LOG_FILE path depends on the apache version)

If this file contains this error:
PHP Fatal error: Call to undefined function mysql_connect()

Check your php.ini (int /etc/php5/apache2, PATH depend the version) file:
Include the below line in the php.ini file:
extension=mysql.so

It'll work!