PHP Search Results - Default to all results when page loads

I have a php search on my site, however I am struggling to figure out how to show all the results from a table when the page first loads - any help will be greatly appreciated.

The PHP part of this form is:

mysql_connect (“xxx”, “xxx”,“xxx”) or die (mysql_error());
mysql_select_db (“database”);
$term = $_GET[‘term’];
$sql = mysql_query(“select pagetitle from table where extra like ‘%$term%’”);
while ($row = mysql_fetch_array($sql)){
echo ‘’.$row[‘pagetitle’];
echo ‘


Any ideas anyone?

Sponsor our Newsletter | Privacy Policy | Terms of Service