ID: 26044
Updated by: [email]elmichaphp.net[/email]
Reported By: martijn at fenomedia dot com
-Status: Bogus
+Status: Feedback
Bug Type: *General Issues
Operating System: FreeBSD 4.8
PHP Version: 4.3.4RC3
New Comment:

Please send a _short_, but _complete_ example then. Cut off all
unnecessary things, like the JavaScript, but make sure that your source
is still complete, so that we don't have to guess what your code might
be. And of course if you don't select one of your BIDs, you won't see
the array, because the browser does not send it (use the GET method to
see what the browser sends).


Previous Comments:
------------------------------------------------------------------------

[2003-10-30 14:32:31] martijn at fenomedia dot com

ok again (I copy & paste the code, to avoid case typo's, sorry for
that)

1 <select name="NID" multiple size=10 ondblclick="voegToe();"
style="width:480;">

2 <select name="BID[]" multiple size=10 ondblclick="haalWeg();"
style="width:480;">

on top:

if (isset($_POST['BID']))
{
$tmp = $_POST['BID'];
}

Notice: Undefined index: BID

------------------------------------------------------------------------

[2003-10-30 14:19:12] [email]elmichaphp.net[/email]

Thank you for taking the time to write to us, but this is not
a bug. Please double-check the doentation available at
[url]http://www.php.net/manual/[/url] and the instructions on how to report
a bug at [url]http://bugs.php.net/how-to-report.php[/url]

Use e.g. phpinfo() to see which variables are populated.
$_POST["bid"] is not the same as $_POST["BID"].

------------------------------------------------------------------------

[2003-10-30 13:59:23] martijn at fenomedia dot com

Description:
------------
I have two select boxes, to link news items.


Reproduce code:
---------------
Article name

All articles:
<form method=post action="<?=$_SERVER['PHP_SELF']?>">
<select name="nid" multiple size=10>
<option value=1>Article name
<option value=2>Article name
</select>

Linked articles:
<select name="bid[]" multiple size=10>
<option value="1>Article name
</select>
</form>

on the top of the page i do a
if (isset($_POST['BID']))
{
' it never get's here!!
$tmp = $tmp = $_POST['BID'];

}
else
{
' I print the form
}





Expected result:
----------------
$tmp = $_POST['BID'];

should contain an array of id's...

Actual result:
--------------
$tmp = $_POST['BID'];

Notice: Undefined index: BID

even with the following option in php.ini
always_poulate_raw_post_data

I'll get only the NID!


------------------------------------------------------------------------


--
Edit this bug report at [url]http://bugs.php.net/?id=26044&edit=1[/url]