Jump to content


error message not displaying

  • Please log in to reply
No replies to this topic

#1 slashpine

  • Members
  • PipPipPip
  • Advanced Member
  • 70 posts

Posted 26 April 2006 - 02:14 PM

I have a script that searches a database for individual business names...

way too may users are trying to use this script/form to find business categories, regardless of the fact it is distinctly labled as such...

The programmer that originally helped me with this scrpt included such an error message but it does not work... if there are no results the script returns a blank form with no message...

how can I get this script to return a message telling users they are using the wrong form when no results are returned

here is the part of the scrip that does not work

TIA for any help...


$searchTerm = trim($_POST['searchTerm']);

$submit = trim($_POST['submit']);

$input_form = <<< END

<form name="searchForm" action="{$PHP_SELF}" method="post" onSubmit="return checkInput();">

Search by name:

<input type="text" name="searchTerm" size="20" maxlength="45">

<input type="hidden" name="submit" value="Search">

<input name="submit" type="submit" value="Search">



$error_msg = <<< END

<font color="red">We are unable to process your request at this time, please try again in a few moments.</font>




// if no results, 

$no_results = <<< END

There were no results with the searchterm '<font color="blue">{$searchTerm}</font>', please try again.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users