Re: Undefined index error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Ah, you're right.  Thanks, Tijnema.

I'm just getting my feet wet with PHP, and you guys are a great help!

Christian

On 6/10/07, Tijnema <tijnema@xxxxxxxxx> wrote:

On 6/10/07, Christian Cantrell <christian.cantrell@xxxxxxxxx> wrote:
> I'm getting this error in my Apache log file, and I can't figure out
why:
>
> Undefined index:  password in /path/to/file.php on line 82
>
> Some searching on Google turned up a bunch of questions, but no answers.
> Any idea what this warning message is referring to?
>
> Thanks,
> Christian

Yes, you're probably trying to get a value from an array by using a
key that isn't in the array.
Something like this:
<?php
$array = array( "user"=> "test", "foo"=>"bar");
$value = $array['password']; // Key "password" doesn't exist!
?>

Check the line number and print out the array with var_dump/print_r to
see what's in the array..

Tijnema
>


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux