i am writing code and i keep getting the error: mysql_fetch_array: supplied arguement is not a valid mysql resource. here is the code:
<?php
include"dbconnect.php";
$item=$_POST['item'];
$query3="SELECT * FROM selling WHERE name LIKE %item% AND state='$state' LIMIT 0,30";
$result3 = mysql_query($query3);
while($item = mysql_fetch_array($result3)){
echo "<img src='$item[pic]' alt='pic'><a style='color: white;' href='?goto=viewitem&id=$item[id]>",$item['name'];
?>
</td><td style='width: 20px;'></td><td style='color: white;'><?php echo $item['price']," | ",$item['date']," | ",$item['email']; ?>
</td></tr>
<?php
}
mysql_close();
?>
i think its something wrong with the query, but im not sure