|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2002-03-17 12:43 UTC] sander@php.net
[2002-06-19 01:00 UTC] php-bugs at lists dot php dot net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 22 16:00:01 2025 UTC |
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 nico@vddi.co.za <?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) ?>