Unknown column 'peterspeters' in 'where clause'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi All,

the below code generates this error,

Unknown column 'peterspeters' in 'where clause'

mysql_select_db("status", $db);
$username = $_POST["username"];
$password = $_POST["password"];
$result = mysql_query("SELECT customer_id FROM Customers WHERE customer_username = $username AND customer_password = $password") or die (mysql_error());
$myrow = mysql_fetch_row($result);
$customer_id = $myrow[0];
$_SESSION['customer_id'] = $customer_id;
?>
</head>
<body>
<?php
echo 'SQL Query: '.$result.'<br>';
echo "CustomerID = $customer_id";
?>


Cheers.

Mark Sargent.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux