The main thing in this PHP script is the MySQL query. Something like. After that the PHP code will be easy(very easy).Code:SELECT * FROM table WHERE col LIKE '$keyword%';
P.S. This is just a LITTLE LITTLE snippet.Code:<?php $query='SELECT * FROM table WHERE col LIKE "'.$keyword.'%"; $result=mysql_query($query); $data=array(); while ($row=mysql_fetch_assoc($result)) { $data=array_merge($data,array($row)); } // $data will contain all data from mysql where table.col contains $keyword ?>