ID:               16096
 Updated by:       [EMAIL PROTECTED]
 Reported By:      [EMAIL PROTECTED]
-Status:           Open
+Status:           Feedback
 Bug Type:         Arrays related
 Operating System: Linux 2.3 (Suse 7.0)
 PHP Version:      4.0.6
 New Comment:

Can't reproduce with latest CVS. Can you try a snapshot from
snaps.php.net?


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

[2002-03-15 07:52:39] [EMAIL PROTECTED]

Below some code.

The array PM_method is setup as a HTML form that is fed to the next
stage where $act = 1.

Note that gettype reports it as a string and echo can't print it
because it is an array.

Regards

Nico
[EMAIL PROTECTED]


<?php

#phpinfo();

if ($act == 1){


echo "Print Vars <p>";

$TT = gettype($var);


while (list($var, $value) = each($HTTP_POST_VARS)) {

$TT = gettype($var);

#echo "TTT $TT XX $var YY $PM_method[2] bb <p>";
echo "Gettype sees \$$var as a $TT<p>";
echo "Echo sees \$$var as an array $PM_method<p>";

        
echo "POST $var = $value<br>\n";
                
                } # end while


} # end if ($act == 1)




if ($act == 0 || empty($act)){

?>

<form action="<?php echo $PHP_SELF ?>" method="post" name="form">

<table><tr><td style="text-align: right;">Bank Transfer:</td><td>
<input type="checkbox" name="PM_method[2]" value="2" checked></td>
<td style="text-align: right;">Cash:</td><td> <input type="checkbox"
name="PM_method[1]" value="1" checked></td>
<td style="text-align: right;">Cheque:</td><td> <input type="checkbox"
name="PM_method[3]" value="3" checked></td>
<td style="text-align: right;">Company Order:</td><td> <input
type="checkbox" name="PM_method[10]" value="10" checked></td>
</tr>

<tr>
<td style="text-align: right;">Voucher:</td><td> <input type="checkbox"
name="PM_method[9]" value="9"></td>
<td style="text-align: right;">American Express:</td><td> <input
type="checkbox" name="PM_method[4]" value="4"></td>
<td style="text-align: right;">Diners Club:</td><td> <input
type="checkbox" name="PM_method[5]" value="5"></td>
<td style="text-align: right;">Eurocard:</td><td> <input
type="checkbox" name="PM_method[8]" value="8"></td>
</tr>

<tr>
<td style="text-align: right;">Master Card:</td><td> <input
type="checkbox" name="PM_method[7]" value="7"></td>
<td style="text-align: right;">VISA:</td><td> <input type="checkbox"
name="PM_method[6]" value="6"></td>
</tr>
</table>

<input type="hidden" name="act" value="1">
<input type="submit" name="Submit" class="button" value="Register
Supplier">
<input type="Reset" class="button"></div>
</FORM>

<?php 

;} # end if ($act == 0 || empty($act)

?>


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


-- 
Edit this bug report at http://bugs.php.net/?id=16096&edit=1

Reply via email to