Returns Blank
| From: | Squeakypants | Date: | Thu, 20 Jan 2005 03:50:49 +0000 |
| Subject: | Returns Blank | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-38226@lists.php.net to get a copy of this message | ||
I can't figure this out, it just shows blank...
$user=$_POST['user'];
$pass=$_POST['pass'];
mysql_connect($host,$username,$password);
@mysql_select_db($database) or die( "Unable to select database");
$query = "SELECT credits FROM krypto WHERE user = '" . $user . "' AND
pass = '" . $pass . "'";
$result = mysql_query($query);
if (!$result) {
echo 'Could not run query: ' . mysql_error();
exit;
}
echo mysql_result($result, 3);
mysql_free_result($result);
mysql_close();