PHP 4.0 Bug #9924 Updated: Warning: Undefined index: Service[1]
| From: | hholzgra@php.net | Date: | Thu, 22 Mar 2001 15:14:02 +0000 |
| Subject: | PHP 4.0 Bug #9924 Updated: Warning: Undefined index: Service[1] | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-49748@lists.php.net to get a copy of this message | ||
ID: 9924
Updated by: hholzgra
Reported By: john@neutralize.com
Old-Status: Open
Status: Feedback
Bug Type: Arrays related
Assigned To:
Comments:
i would suggest that you put qoutes arround *all*
tag attribute values:
<input
type="Hidden"
name="Service[<?php echo $counter ?>]"
value="<?php echo odbc_result($result, 'ServiceId')?>"
>
and you could use var_dump($HTTP_POST_VARS)
and the generated HTML code to further analyse
the cause of the problem?
Previous Comments:
---------------------------------------------------------------------------
[2001-03-22 09:57:27] john@neutralize.com
I am dynamically creating input fields in my form with their values stored in an array:
<input type="Hidden" name=Service[<?php echo $counter ?>] value=<?php echo
odbc_result($result, "ServiceId") ?>>
These submit fine but I am having trouble accessing the results of the array from the post
variables:
$serviceId = $HTTP_POST_VARS["Service[".$counter."]"];
Do I need to use unicode decompression before referencing the variables or am I just building the
reference wrong?
Have looked at PHP help but only tells you how to use arrays in form variables not how to retrieve
them.
---------------------------------------------------------------------------
ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=9924&edit=2