try to connect with
mysql_connect('localhost', 'root', '') or die (mysql_error());
mysql_select_db ('databasename');
I tried the above, but I got the same "No Database selected"
here's what my code looks like now:
$con = mysql_connect('localhost', 'root', '') or die (mysql_error());
mysql_select_db ('Testdata');
$sql = "CREATE TABLE person
(
FirstName varchar(15),
LastName varchar(15),
Age int
)";
mysql_query($sql,$con);
Maybe I'm not setting up the database Testdata correctly.
Its int he same directory as my test website.
I have my test website in C:/wamp/www/testwebsite/
I setup the database to be in the same location.
I also tried putting it in C:/wamp/www/
Was I supposed to setup the DSN in the control panel using the ODBC?
Or is that only with access databases?