I need to have radio buttons remain selected and still be able to use pagination. Let me elaborate.
I am using PHP 4.2.2 to code an administration page that lists users and allows an admin to choose a pair of users so that files may be copied from one user to another. The users are chosen via radio buttons and a form is used to submit the users to another page where files are chosen and the copy is executed. I am also using pagination, sessions and output buffers. Both pagination and the radio buttons are working great independently. However, if I select one user on one page and the second user on another page the selection of the first user is lost. If both users are selected on the same page the form works as expected.
Can I get radio buttons and pagination to work using PHP? If so how?
Do I have to use JavaScript? I've seen post on the net suggesting JavaScript but I can't get it to work either. I've tried setting the radio button to "true" directly and using a function:
Directly
<input type="radio" name="from_user" value="'.$row['user_id'].'"
onChange="document.ChooseUsers.from_user.checked=\'true\'">
and with a function
<SCRIPT LANGUAGE="JavaScript">
<!-- Beginning of JavaScript -
function FromUser (textstring)
{
ChooseUsers.from_user.checked='textstring'
}
// - End of JavaScript - -->
</script>
<input type="radio" name="from_user" value="'.$row['user_id'].'"
onChange="FromUser(true)">
Thanks for your time