Re: PHP Notice Problem
On Wed, 15 Oct 2008 19:32:23 +0100, David Powers <david@example.com>
wrote:
>Gary White wrote:
>> if (!isset($_GET['search']))
>> {
>> $search = $_GET['search'];
>
>That won't work. You've put the negative operator in there by mistake.
>
>It should be this:
>
>$search = isset($_GET['search']) ? $_GET['search'] : null;
You're right ... I think. The logic in the original post threw me. It
was my understanding that the O/P wanted to display the form if it had
not been submitted. The only thing the $search variable was being used
for was to test that the form had been submitted. If you simply
omitted the $search = $_GET['search'] line, it should work. ;-)
Gary
|