Ok, I've just started learning php, and for some reason the mysql_connect()
and mysql_select_db()
do not appear to connect to the database.
I also need a good example of a mysql table, as I am not sure what to put in my table. How do I manage to connect my site to the database?!
Here is the code I am using in my connect.php page.
<?php
//not working
$connect = mysql_connect('localhost',
'myuser', 'password', 'mypass')
or die("This function should work.");
//still a lingering error
$db_select = mysql_select_db("mydbname", $connect);
?>