Hugh Beaumont <[EMAIL PROTECTED]> wrote:
I've been working with
error_reporting(E_ALL)
set lately trying to write code that does not give notices or errors.
What is the proper way to set a variable so that it's non-existance
will not generate
a notice?
Thanks all for the replies. I
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
"="
> I've been working with
>
> error_reporting(E_ALL)
>
> set lately trying to write code that does not give notices or errors.
>
>
> What is the proper way to set a variable so that it's non-existance
will not generate
> a notice?
>
Thanks all for the replies. I also noticed a small typo i
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['exac
Hugh Beaumont wrote:
I've been working with
error_reporting(E_ALL)
set lately trying to write code that does not give notices or errors.
I have not been able to solve the following:
given a form with a checkbox that may or may not be set, we'll call it "exact" as in
the following code output
I've been working with
error_reporting(E_ALL)
set lately trying to write code that does not give notices or errors.
I have not been able to solve the following:
given a form with a checkbox that may or may not be set, we'll call it "exact" as in
the following code outputs :
Notice: Undef
6 matches
Mail list logo