mysql_select_db(): supplied argument is not a valid MySQL-Li
Posted: Wed Feb 10, 2010 8:16 am
Hey. Here's my code:
when i run that, i get following error message:
Warning: mysql_select_db(): supplied argument is not a valid MySQL-Link resource in /home/menkaur/public_html/php/index.php on line 17
what's the problem?
Code: Select all
<html>
<head>
<title>check this out page</title>
</head>
<body>
<?php
$host = 'localhost';
$user = 'xxx';
$pass = 'yyy';
$db = mysql_connect($host, $user, $pass) || die("something went wrong");
$dbName = "menkaur_moviesite";
echo $dbName;
mysql_select_db($dbName, $db);
?>
</body>
</html>Warning: mysql_select_db(): supplied argument is not a valid MySQL-Link resource in /home/menkaur/public_html/php/index.php on line 17
what's the problem?