Sorry for this very beginner question... I have a table like
| id | block_1 | block_2|
-------------------------
| 1 | Mark | John |
| 2 | Antony | |
-------------------------
i want check if text in a cell match my variable for example $name:
...
$sql = "SELECT * FROM my_table WHERE id='1'";
$res = mysql_query($sql, $connection);
$row = mysql_fetch_array($res);
$block1 = $row['block_1'];
$name = 'Mark';
if ($block1 == $name)
{
echo 'yes';
}
else
{
echo 'no';
}
but i think my reasoning is wrong, im beginner... all solutions are welcome