Jump to content

delete missing from POST - Is it web server issue or php bug?


Recommended Posts

Hi,

  I'm getting weird result for below code & someone told me to post the question in Web server admini part...

a.php

====

<form name="aa" method="post">

  <input type="text" name="xx" value="77">

  <input type="image" name="delete" value="Delete" src="images/1.gif" alt="Delete">

</form>

<?php

    print_r($_POST);

?>

 

When I clicked the delete button, this is what I get:

 

Array ( [xx] => 77 [deleteasn_x] => 49 [deleteasn_y] => 10 )

 

instead of

 

Array ( [xx] => 77 [delete_x] => [delete_y] => [delete] => Delete )

 

Version info on Windows XP:

C:\>c:\php-5.2.3\php.exe -v

PHP 5.2.3 (cli) (built: May 31 2007 09:37:22)

Copyright © 1997-2007 The PHP Group

Zend Engine v2.2.0, Copyright © 1998-2007 Zend Technologies

 

Apache Version: Apache2.2.4

 

Any idea, why delete is missing from POST?

 

Thanks!!!

  • 6 months later...

Well i do not see any action="" in the <form>

 

<form method="post" name="aa" action="<? echo $_SERVER['PHP_SELF']; ?>">

</form>

 

The only value that should show up is $_POST['xx'] == "77" and $_POST['delete'] == "Delete"

 

I do not see where you are getting any other results

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.