slashpine Posted April 26, 2006 Share Posted April 26, 2006 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 returnedhere is the part of the scrip that does not work TIA for any help...[code]$PHP_SELF = $_SERVER['PHP_SELF'];$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"></form>END;$error_msg = <<< END<font color="red">We are unable to process your request at this time, please try again in a few moments.</font><br><br>$input_formEND;// if no results, $no_results = <<< ENDThere were no results with the searchterm '<font color="blue">{$searchTerm}</font>', please try again.<br><br>$input_formEND;?>[/code] Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.