I have a db of Movie Titles, stars, descriptions, etc...
I have a PHP page that lists all of the movies in a nice table. At the bottom of the table is a form for users to enter data to filter the table.
In this case, I am successfully passing the variable $title back to the script.
My current query is:
$result = mysql_query ("SELECT * FROM movies ORDER by title");
How do I alter that to list the records whose title CONTAINS the variable $title.
I have tried:
$result = mysql_query ("SELECT * FROM movies (WHERE title LIKE $title) ORDER by title");
But even if I enter the title exactly, I can't seem to get it filter right.
Any ideas?