You are here: Unknown column 'peterspeters' in 'where clause' « PHP « IT news, forums, messages
Unknown column 'peterspeters' in 'where clause'

Posted by Mark Sargent on 10/20/54 11:16

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.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация