Re: a php code

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hongwei Li wrote:
Hongwei Li wrote:

Hi,

We have fc1 with php 4.3.6-1.3 and apache 2.  I have a problem with php
codes and ask for help.

My question might be off topic of this list.  But, since I don't know a
good mailing list of php groups, so I post it here.  If somebody can
help
me, or tell me a good place to ask, I'd greatly appreciate.

Here is my test code, called fm.php:

<?php
if (!isset($pick)) {
echo "Select color(s) and submit the form below."; }
else {
$j = count($pick);
for($i=0; $i<$j; $i++) {
 echo "Pick <b>$pick[$i]</b> is Checked<br />"; }
}
?>

<form action="<?php echo $_SERVER['PHP_SELF']; ?>">
<ol>
<li>Red<input name="pick[]" type=checkbox value="Red" /></li>
<li>Blue<input name="pick[]" type=checkbox value="Blue" /></li>
<li>Yellow<input name="pick[]" type=checkbox value="Yellow" /></li>
</ol>

<input type="submit" value="Submit!" />
<input type="reset" value="Reset" />
</form>


Hi Hannes,

Your codes work.  Thank you very much!  Actually, my code was from
php.net's samples.  I don't know why they use array for it. Now I
understand more.

I appreciate your help!

You're welcome! :-)

From php.net ? Please post the url ... maybe they didn't backslash some
variables and the output is somewhat garbled..

Cheers,
Hannes.










[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux