Hi,
I have a form (blank) with a listbox and a submit button.
code:
[INDENT]$gnNoAry = array();
sc_set_global($gnNoAry);
echo “<form id=‘form1’ name=‘form1’ method=‘post’ action=’…/showresult.php’>”;
echo " <select name=‘gnNoAry[]’ size=‘30’ multiple=‘multiple’ tabindex=‘1’ method=‘post’>";
while ($row = mysql_fetch_array($result)) {
$thename = $row[‘no’]." “.$row[‘cname’];
$theno = $row[‘no’];
echo " <option value=$gnNoAry>$thename</option>”;
}
echo " </select>";[/INDENT]
When the user select some item in the list and press “submit”, I want to pass the selected items in an array gnNoAry to another application showresult.php
showresult.php
[INDENT]<?php
echo ‘gnNoAry:’;
print_r($_POST[‘gnNoAry’]);
?>[/INDENT]
However, I got the follow error message:
gnNoAry: Notice: Undefined variable: _post in C:…\showresult.php
Can some help me?
Best regards,
Lai