The following code snippet runs on my Windows 2000 Pro laptop which has MYSQL and IIS with PHP installed, and does not give a problem. However, when I run the same code on Windows NT 4.0 server and IIS with PHP I get the warning. When I try to suppress the warning, no results are sent to the browser, just a blank page.
CODE SNIPPET:
$cnx = @mysql_connect('localhost','administrator','*****');
mysql_select_db('intranet');
// query mysql to verify the account
$sqlclause = "SELECT pwd FROM users WHERE username = '$username' AND pwd = '$pwd' LIMIT 0, 1";
//the line below causes the warning
$sqlquery = mysql_query($sqlclause,$cnx) or die(mysql_error());
$sqlresults = mysql_num_rows($sqlquery); //
@mysql_free_result($sqlquery);
WARNING:
Warning: Supplied argument is not a valid MySQL-Link resource in c:\Inetpub\wwwroot\intrazone\admin\intranetapp.php on line 15
LINE 15 refers to:
$sqlquery = mysql_query($sqlclause,$cnx) or die(mysql_error());
Help!!!