Hello there, I wrote this little script to create mysql databases on the fly to test something. My difficulty is that when I run the script, there is nothing on the page - it is completely blank.
I have a site that relies upon php, and that works fine, error reporting is on inside of php.ini, and I'm stumped. Here's my code:
<?php
$conn = @mysql_connect("localhost","nick","568610")
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>
saved as create_db.php. If someone could let me know where I am going wrong, what config I have missed, I would be exceptionally grateful. it appears only working code shows anything.
Many thanks,
Nick