im trying to create a db (my first try with my sql) and it doesnt seems to work
im using this code to create a DB
and a table
<?
mysql_connect("localhost","name", "pass");
mysql_query("CREATE DATABASE try");
mysql_select_db("try");
mysql_query("create table table1([name varchar(255), email varchar(255), url varchar(255), message blob])");
echo "DB try was created"
?>
and i get the text "DB try was created"
but when im trying to view the databases with the code :
<?
mysql_connect("localhost","name", "pass");
echo mysql_query("show databases");
?>
i get
Resource id #2
and if im trying to insert data i get the
msg 'No Database Selected'
what is the problem ?
thanks to anyone that tries to help me