Hello Every Body.
M is new in PHP. I have a problem. I have write a book example which get all built-in database names and show.
When i run this example it show me nothing. it also did not show me any error.
PLease help me in this matter. Bcz i have to make a php database project.
I have install
IIS 5.0
PHP Version 4.3.6 (Executeable, setup)
Sql(Mysql server and client 4.0.2.0a) setup
All settings are by default.
Code is here.
<?php
$host = "localhost";
$user = "";
$password = "";
?>
<select name="database" size="1">
Please select the database..
<?php
mysql_connect($host, $user, $password);
$db_table = mysql_list_dbs();
for ($i = 0; $i < mysql_num_rows($db_table); $i++)
{
echo("<option>" . mysql_tablename($db_table, $i));
}
?>