All:
My problem is probably a simple coding issue, but I can't figure it out.
This is with PHP 4.0.6 on Win2K with IIS5.
I have a html form (using checkboxes) gathering some data, and I pass it
onto a PHP file. When the user checks the checkbox, everything works
properly. Here is a sample of the html (it is standard):

<input type="checkbox" name="CategoriesONE" value="ONE"> Type: One<br>
 <input type="checkbox" name="CategoriesTWO" value="TWO"> Type: Two<br>

Now, in my PHP I have the following routine:

<?
 if ( $CategoriesONE != "" )
  echo "ONE ";
 if ( $CategoriesTWO != "" )
  echo "TWO ";
?>

If you check the box, the resultant PHP file generates an html page with the
word ONE and/or TWO like it should.
BUT, if you leave either or both of the checkboxes empty (don't check them)
I get the following error:

Warning: Undefined variable: CategoriesONE in
C:\inetpub\wwwroot\PrintUserForm.php on line 71
Warning: Undefined variable: CategoriesTWO in
C:\inetpub\wwwroot\PrintUserForm.php on line 73

I tried adding an ELSE statement after each IF clause, to no avail.
I also tried changing the != ""  to == "ONE" (and == "TWO" for the other),
but that didn't work either.

Has anyone heard of some problem between PHP on WIN2K running IIS5? The
reason I say this is that I also have another 2K box with Apache, and on
that one these 2 pages work perfectly..
Unfortunately, I have to get it running on IIS.

Any help/insight will be appreciated.
Thanks!

Joseph Moore






-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to