The usual way to search for 'something' inside a database is writing a
SQL
query, and
PHP
makes no exception.
Hence write a sensible query (you may have a look at
MySQL tutorial[
^]) and use PHP to fetch results (see, for instance,
mysql_query[
^] documentation).