On Wed, 6 Oct 2004 06:53:34 -0700 (PDT), Hugh Beaumont
<[EMAIL PROTECTED]> wrote:
> Notice: Undefined index: exact in search.php on line 10
> 
> code :
> 
> if (!isset($_POST['exact'])) {   <--------- line 10
>   $_POST['exact'] == false;
> }

Reverse the logic of isset().  

if (isset($_POST['exact'])) {
  $_POST['exact'] == TRUE;
}

If a variable is genuinely not set, it will produce the warning or
notice you are seeing.  There are a few ways to circumvent that: lower
your error reporting level, or quiet the error with @, or reverse the
logic so the error doesn't exist.  I prefer the last method as I
always use full error reporting during development.


-- 
Greg Donald
Zend Certified Engineer
http://gdconsultants.com/
http://destiney.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to