oicram wrote:
> As I have the results appearing on the same page as
search function, the show
> if recordset is empty will not properly work, since the
"No Records Match Your
> Criteria" message will appear as soon as you open the
page.
This is a failing of the way the Show if recordset is empty
server
behavior, but it's easy to remedy.
> how do I get this message to only show after the user
have searched?
The code as inserted by Dreamweaver looks like this
(recordsetName will
be replaced by whatever name you gave your recordset):
<?php if ($totalRows_recordsetName == 0) { // Show if
recordset empty ?>
Change it like this:
<?php if (array_key_exists('submitButtonName', $_POST)
&&
$totalRows_recordsetName == 0) { // Show if recordset empty
?>
Replace submitButtonName with the name of the submit button
in your
search form. That's all there is to it.
--
David Powers, Adobe Community Expert
Author, "The Essential Guide to Dreamweaver CS3" (friends of
ED)
Author, "PHP Solutions" (friends of ED)
http://foundationphp.com/