I'm running PHP4 and mySql (both installed from source) on RH7. I'm using this little test script <?php $link = mysql_connect or die ("Could not connect"); print ("Connected successfully"); if (mysql_create_db ("my_db")) { print ("Database created successfully\n"); } else { printf ("Error creating database: %s\n", mysql_error ()); } ?> And I get this in response. Connected successfully Fatal error: Call to undefined function: mysql_create_db() in /var/www/sensei/htdocs/phpMyAdmin/test1.php3 on line 5
Any help would be appreciated... Thanx in advance.
The connection to the database appears to be wrong, try using the code below, just enter the correct variables
$db = mysql_connect("host", "username", "password");
mysql_select_db("database names",$db);