|
Posted by Martie on 09/28/09 11:47
On Fri, 12 May 2006 17:01:02 GMT, Harold Ralston wrote...
>
>I have a page that searches my database for instances of the surname
>submitted through a POST form.
>
>http://www.ralstongenealogy.com/waterfordquery.php
>
>If a viewer submits it with the surname data blank empty, it brings
>up the entire data base to my results web page.
>
>I don't want this to happen. Instead I want to tell the viewer to
>submit a valid surname and show no results.
>
>So far I have this and want to add code that will not bring up any
>data to the results page. What do I need to add?
>
>Thanks for any help. Harold Ralston
>
><?php
>if(empty($surname))
>{
>echo "Please enter valid surname.";
>}
> ?>
It looks like that condition is printing the message, but you might need to add
an "else" loop to print the results if they aren't empty. The condition you have
above just prints an error message is applicable.
--
NewsGuy.Com 30Gb $9.95 Carry Forward and On Demand Bandwidth
Navigation:
[Reply to this message]
|