I'm trying to create a database within ny server using php script. I have a script that I have found in a book that I copied to use,However I must have copied it wrong or it has a bug i can't figure out, Need Help. Thanks.
<?php
$conn = @mysql_connect("localhost","frank","")
or die( "Sorry - could not connect to MySQL");
$rs1 = @mysql_create_db( $_REQUEST['db'] );
$rs2 = @mysql_list_dbs( $conn );
for( $row = 0; $row < mysql_num_rows( $rs2 ); $row++ )
{ $list .= mysql_tablename( $rs2, $row) . " | "; }
?>
<html><head><title>Creating databases</title></head>
<body>
<form action = "<?php echo( $_SERVER['PHP_SELF'] ); ?>"
method="post">Current databases: <?php echo( $list ); ?>
<hr>Name:<input type = "text" name = "db">
<input type = "submit" value = "Create database">
</form></body></html>