The strangest output

From: Date: Sat, 17 May 2003 21:33:44 +0000
Subject: The strangest output
Groups: php.general 
Request: Send a blank email to php-general+get-148046@lists.php.net to get a copy of this message
Hey guys, Still stuck on this after 4 hours...and cant understand why it isnt working. The output of this code is below but heres the code first: <?php require_once("configbwh.php"); error_reporting (E_ALL); $user= $_POST["user"]; $pass= $_POST["pass"]; if(isset($user) && $user && isset($pass) && $pass) { $connected=mysql_connect ("$hostt", "$userr", "$passs") or die ('I cannot connect to the database because: ' . mysql_error()); mysql_select_db ("$db"); $query_count = "SELECT COUNT(*) FROM main_co where user='".$user."' and pass='".$pass."'"; $result_count = mysql_query($query_count); if($result_count==1) { session_start(); header("Cache-control: private"); //IE 6 Fix $_SESSION['user'] = $user; $_SESSION['pass'] = $pass; print($result_count); // header("Location:co.details.php"); error_reporting (E_ALL); exit; } print("wrong"); } ?> when i execute that script i get the output: "wrong", and if I put : if($result_count==2) instaed of : if($result_count==1) then I get this strange output: Resource id #2 What the heck is wrong with this code? -Ryan

« previous php.general (#148046) next »