By putting the below code on top of Index.php
<?php
function authenticate() {
header('Content-Type: text/html; charset=' . $GLOBALS['charset']);
header('WWW-Authenticate: Basic realm="Test Authentication System"');
header('HTTP/1.0 401 Unauthorized');
echo "You must enter a valid login ID and password to access this resource\n";
exit;
}
if (!($SERVER['PHP_AUTH_PW'] == "username" && $SERVER['PHP_AUTH_USER'] == "password")) {
authenticate();
} else {
Phpmyadmin index file code comes here
}
sharma