hi the following php code brings back a message on the screen sayin unknown column in where clause.
<?phperror_reporting(E_ALL);
if (!isset($_POST[‘Submit’])) {
// form not submitted
?>
searchsearch By... book ISBN book Title catID <?php } else { // form submitted // set server access variables $search = empty($_POST['search'])? die ("ERROR: Enter search Criteria") : mysql_escape_string($_POST['search']); $dropdown = empty($_POST['dropdown'])? die ("ERROR: Select from dropdown") : mysql_escape_string($_POST['dropdown']); // Open Connection //Select Database $conn = mysql_connect ('localhost', 'unn_w10019262', 'davidson') or die("Could Not Connect to MySQL!"); mysql_select_db("unn_w10019262") or die("Could Not Open Database:".mysql_error()); //Create Query $sql = "SELECT * FROM nbc_book WHERE bookTitle='$bookTitle'" or die (mysql_error()); $result = mysql_query($sql) or die (mysql_error()); $num=mysql_numrows($result); mysql_close($connect); echo "Database Output
"; $i=0; while ($i < $num) { $bookISBN=mysql_result($result,$i,"ISBN"); $bookTitle=mysql_result($result,$i,"Title"); $catID=mysql_result($result,$i,"catID"); echo "
bookISBN: $bookISBN
bookTitle: $bookTitle
catID: $catID
"; $i++; } } ?>
could someone help me please