PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
You have register_globals on so when your processing script starts
preselectvar has already had its values assigned. Then you assign the
form values to an element of preselectvar.
don't include the []'s when you want to assign the whole array. In PHP the empty []s tell it to assign whatever come next to the first empty spot of the array, not to overwrite the whole array.
Yes the corrected version will work under either setting of register_globals. The incorrect version would have failed under either, but the array would have looked different.