Friday, March 26, 2010

array_key_exists('ca...

Good evening all,

I'm trying to work thru the David Powers book ''The essential guide to Dreamweaver CS4''?In chapter 14 he's explaining how to create a form to delete records using the delete record server behavior.?I've created the form several times, always with the same error.

Warning: array_key_exists() [function.array-key-exists]: The second?argument should be either an array or an object

and then a line number to the beginning of this code.?I've read a little that seems to imply that this might be a bug in php.?I'm using

PHP Version 5.2.9

if (array_key_exists('cancel', $POST)) {
?header('Location: http://www.someplace.php');
exit;

any help is appreciated

A.

array_key_exists('ca...

Thanks for reading my book. The answer is quite simple. The superglobal array is $_POST, not $POST. Add the underscore, and it will work.

array_key_exists('ca...

Thank you,

That solved the problem.?Great book by the way.?I'm learning a ton.

Thanks

Art

No comments:

Post a Comment