Sneakyimp,
Many thanks for taking the time to reply - much appreciated.
Sorry for the lack of an example but I'm, quite literally, trying to build this using php / MySQL from scratch.
I have worked previously on such a database built using .asp and MS Access but I acknowledge the shortcomings of same and want to build a robust version. Even the single line of code you produced above has given me some insight as to the potential functionality of same.
Am I correct in assuming that I could use individual forms (search boxes) together on a page - each with their own variables / tables to search? If so what I'm hoping to achieve is a three or four search box form which will search by location, occupation, company name; Here is an example of the end results which I hope to come up with:
This search query :
$result = mysql_query("SELECT Name, Company, Email, Address1, Address2, Address3, Address4, Address5, Genre, Occupation FROM contacts LIMIT 0, 5 $max")
or die(mysql_error());
Gives me this output:
{
echo "<ul class='db_output'>\n";
echo "<li><strong>Name:</strong> {$row['Name']}</li>\n";
echo "<li><strong>Occupation:</strong> {$row['Occupation']}</li>\n";
echo "<li><strong>Company:</strong> {$row['Company']}</li>\n";
echo "<li><strong>Address:</strong> {$row['Address1']}</li>\n";
echo "<li><strong></strong> {$row['Address2']}</li>\n";
echo "<li><strong></strong> {$row['Address3']}</li>\n";
echo "<li><strong></strong> {$row['Address4']}</li>\n";
echo "<li><strong>Clients:</strong> {$row['Clients']}</li>\n";
echo "<li><strong>Genre:</strong> {$row['Genre']}</li>\n";
echo "<li><strong>Email:</strong> {$row['Email']}</li>\n";
echo "</ul>\n";
echo "</ul>\n";
}
This, along with the other code in the page, actually works and gives me the exact output I require - A list of the first five alphabetic entries in my database. However, it appears that I have managed to code a "Search result" but I have no idea whatsoever what I need to put into the search forms to achieve the desired output.
If that still makes no sense I'm sorry - as I say, I'm building (backwards, it would seem) from scratch.......Ooops!
Paul