RE: [PHP] proper method to do the following...
| From: | Michael Sims | Date: | Wed, 06 Oct 2004 14:09:38 +0000 |
| Subject: | RE: [PHP] proper method to do the following... | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-198755@lists.php.net to get a copy of this message | ||
Hugh Beaumont wrote:
> the following code outputs :
>
> Notice: Undefined index: exact in search.php on line 10
>
> code :
>
> if (!isset($_POST['exact'])) { <--------- line 10
> $_POST['exact'] == false;
> }
You have a typo in line 11. I'm assuming you want to use the assignment operator
"=" instead of the equality operator "==". The PHP parser seems to be
incorrectly
attributing the error to line 10 when it should be on line 11. If you change "=="
to "=" your error will go away. It took me a moment to catch it because of the
misleading error message.
HTH