Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
0

array_key_exists('cancel', $POST)

New Here ,
Sep 01, 2009 Sep 01, 2009

Copy link to clipboard

Copied

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.

Remove RecordsWarning: 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.

TOPICS
Server side applications

Views

549
Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

LEGEND , Sep 02, 2009 Sep 02, 2009

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

Votes

Translate
LEGEND ,
Sep 02, 2009 Sep 02, 2009

Copy link to clipboard

Copied

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

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Sep 02, 2009 Sep 02, 2009

Copy link to clipboard

Copied

LATEST

Thank you,

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

Thanks

Art

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines