Skip navigation.

allbutt.net > designs

 

Web Site Design News & Tips

Helping you get the job done better

Have you come across either a site that has been fantastic or a complete shocker? In this section we will give you tips that we use in designing sites that are shockingly fantastic. Also, you will read about what I am up to re website design projects.

Daily Tip:

News & Tips:

Simple php search script fix

There is a simple php search script tutorial online but the code is broken.

//This is only displayed if they have submitted the form
if ($searching =="yes")
{
echo "

Search Results

";

//If they did not enter a search term we give them an error
if ($find == "")
{
echo "

You forgot to enter a search term

";
exit;
}

The missing info is that the query isn't looking to what search term was used. Add this to the relevant section above the form.

$parameter = array('find', 'field', 'searching', 'search');
foreach($parameter as $name)
{
$$name = isset($_REQUEST[$name]) ? $_REQUEST[$name] : '';
}

[ 10/02/2006 09:53:00 AM ] +

This page is powered by Blogger, the easy way to update your web site. I trust that this Web Site Design News & Tips helps bring you up to date with what I have been up to recently. If you want to contact me then click here. Thanks for reading some of the most recent news. If you want to read some of the older files then they have been stored in the archives here.