With total disregard for any kind of safety measures
dkb1400@yahoo.com (Scott D) leapt forth and uttered:
[color=blue]
> I am trying to check and see if a field is posted or not, if not
> posted then assign $location which is a session variable to
> $location_other. If it is posted then just assign it to
> $location_other
>
> I keep getting "Notice: Undefined index: location_other"
> referring to (!($_POST['location_other'))
>
>
> if (!($_POST['location_other'])) {
> $location_other = $location;
> }
> else
> if ($_POST['location_other'])
> $location_other = $_POST['location_other'];
>
> THANKS!!!
> -Scott
>[/color]
Its because you're using an array key ($_POST['location_other'])
which hasn't been declared.
The easiest way to get around this is to use
error_reporting(E_ALL ^ E_NOTICE), this will disregard 'Notice'
errors but keep all others.
Either that or use if(!empty($_POST['location_other'])) rather than
just testing for true or false.
--
There is no signature.....