First of all, if u use strings, always compare them using
<?
if ( strcmp ( $s1, $s2 ) == 0 )
{
?>
The strings <?echo $s1?> and <?echo $s2?> are equal
<?
} // end if
elseif ( strcasecmp ( $s1, $2 ) == 0 )
{
?>
The strings <?echo $s1?> and <?echo $s2?> are equal, case insensitive
<?
} // end elseif
else
{
?>
The strings are not equal. <?echo $s1?> is <?echo ( strcmp ( $s1, $s2 ) > 0 ? "longer" : "shorter" )?> than <?echo $s2?>
<?
} // end else
?>
Second, if u use php4, the form variables are no longer accessible by their respective names. so u should be referring to btnSubmit
as $HTTP_POST_VARS [ "btnSubmit" ]or $HTTP_GET_VARS [ "btnSubmit" ] for post and get methods respectively
Third,
When trying to print array data, use this way:
blah blah <?echo $t [ $i ]?> yadayada
or
echo "blah blah " . $t [ $i ] . " yadayada";
instead of
echo "blah blah $t[$i] yadayada"; // this won't work
Last of all:
when walking trough an array, better use foreach rather than for since foreach doesn't use a variable counter, but "walks" through the array step by step:
<?
// this works fine for an associative array:
foreach ( array_keys ( $arr ) as $k )
{
echo "Key ( $k ) holds value " . $arr [ $k ] . "<br>";
}
?>
PS: I use PHP 4, and reading the source code of yours, you are probably using php3, so the second and last point will probably irrelevant. Nevertheless, i suggest u using php4, since it is much more convenient than v3.
good luck! Keep up the good work, anyways
drm