I stuck on something stupid.. I have the table that has only one column. I want to check if there is some value, which I get from the url (method $_GET)
mysql_connect("localhost", "user", "pass") or die(mysql_error());
mysql_select_db("db") or die(mysql_error());
$row=htmlspecialchars($_GET['row']);
$query = @mysql_query ("SELECT * FROM table WHERE row=$row");
if ($result = @mysql_fetch_array($query)) {
echo "There is that row";
}
else {
echo "There is not that row";
}
Can you tell me what's wrong?