To get Selected database use
$res = mysql_query(“SELECT DATABASE()”) or die(mysql_error());
echo mysql_result($res ,0);
To get current username
$res = mysql_query(“SELECT CURRENT_USER”) or die(mysql_error());
echo mysql_result($res ,0);
Tutorialshore
To get Selected database use
$res = mysql_query(“SELECT DATABASE()”) or die(mysql_error());
echo mysql_result($res ,0);
To get current username
$res = mysql_query(“SELECT CURRENT_USER”) or die(mysql_error());
echo mysql_result($res ,0);