Web Analytics Made Easy -
StatCounter Java pop-up needed for blank search - CodingForum

Announcement

Collapse
No announcement yet.

Java pop-up needed for blank search

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Java pop-up needed for blank search

    Hi, I'm trying to get a page to pop when a visitor does a search which yields nothing from the database. My SQL database has a series of tables in it all of which serve different purposes. The table in question is called abacus and serves as a repository or 'bucket' for static data - in this case holiday property details dates available rates etc. The search criteria is for location and date range. All this stuff works fine and dandy yet I cannot get the php to return an echo message to the browser when a search returns empty. In fact it pops up whether the search is successful or not. I am wondering whether there is a slab of java that will recognise a blank return and then pop up a page with the usual sorry the dates requested are not available etc.

    The existing PHP snippet is below:

    result= mysql_query("$db", $queryab);
    if (mysql_num_rows($resultab) == 0) {
    echo "We are sorry but the dates you have selected are either being provisionally held or not available. Please select another date range or contact Selina Brady on 01332 680 550 or [email protected]. Thank you.";
    }

    else
    {
    include ("onlinebooking_results.php");
    }

    Any clues?
Working...
X