> >It depends on where value is coming from. If it's coming from the > >script server side, then you just need to make sure that $value is > >set before the line "<form action=" gets printed. If it's coming from > >the client side, there may be other problems... > $value is defined in the server-side script, but gets activated in the > client's form (after clicking a checkbox) :-(.
Ok, then you are going to need to use Javascript to make this work. Here is some *very rough* pseudo-code: <? echo "<form action=\"\" method=\"post\" name=\"pageForm\">\n"; $anchorTag = "FOO"; echo "<input type=\"checkbox\" OnClick=\"document.pageForm.action.value=\"$PHP_SELF#$anchorTag\">\n"; $anchorTag = "BAR"; echo "<input type=\"checkbox\" OnClick=\"document.pageForm.action.value=\"$PHP_SELF#$anchorTag\">\n"; ?> or something along those lines. You are going to have to set the value of the form's action on the client side, not the server side. For the checkbox, I don't know of "OnClick" is the right event. You will need to look up that form element in a javascript guide for the event that you want. HTH Chris