PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
well, #1, you are telling it to create a database with a name of whatever value $db is, but you aren't assigning it any value at all. Next, you are trying to get the rows in the database, without even first selecting it, or creating a table. if you want to create a database, here is the code for it. After that, you are gonna need to create a table, then maybe the rest of the code will work for you after a little tweaking
<?php
#Database Control
#Creating a Database.
$db = 'Some_Database_Name';
@mysql_connect("localhost", "BLA BLA", "BLA BLA") or die ("Sorry - could not connect to MySQL: " .mysql_error());
$sql = "create database $db";
$result = mysql_query($sql) or die(MySQL_Error());
echo 'database created successfully!;
?>