From: "Sascha Meyer" on
Hi Nagendra,

Nagendra wrote:
> So, What if I define the same global variable twice, will this solve the
> issue?

No, this will most likely overwrite the values from the variables defined
outside of the routine.
I'll try to illustrate this a bit.

[CODE]
<?php
// WON'T WORK
// variables defined and set outside of the function
$filter = "123";
$filterfield = "ID";

function form_fill ()
{
// both variables will be reinitialized with false and the values from the
outside scope will be discarded
$filter;
$filterfield;
}
[/CODE]

[CODE]
<?php
// WILL WORK
// variables defined and set outside of the function
$filter = "123";
$filterfield = "ID";

function form_fill ()
{
// both variables are declared as being defined outside of the function
(global scope)
global $filter, $filterfield;
}
[/CODE]

Did you do it like in the above example 2?

Regards,

Sascha