davecheet wrote:
> ******************
> if ($totalRows_rs_searchresults == 0)
> { // Show if recordset empty ?>
> <div align="center" class="body">Sorry your search
returned no results, please
> try again</div>
> ******************
>
> That works fine but obviously it shows up when the page
is first loaded as the
> number of search results is zero. So how do I get that
message to NOT show up
> until the form has been submitted for the first time?
If you're using the GET method to submit the search form,
amend the
conditional statement like this:
if (isset($_GET['search'])) &&
$totalRows_rs_searchresults == 0)
Change the value of 'search' to the name of the field being
used to
filter the results. If you're using the POST method, use
$_POST instead
of $_GET.
--
David Powers, Adobe Community Expert
Author, "The Essential Guide to Dreamweaver CS3" (friends of
ED)
Author, "PHP Solutions" (friends of ED)
http://foundationphp.com/