I want to use a SELECT LIKE for a string , to get some data from a table.But for some reason the following code does not work.Any clues as to why ? I use HeidiSQl and PHP 5.3.
if(isset($_GET["name"])){
$id=$_GET["name"];
$result = mysql_query("SELECT * FROM categorii_menu WHERE name like'$id%'");
$data=mysql_fetch_row($result);
echo $data[6]; //content of $id
}