--- In [email protected], "Charlie Markwick" <[EMAIL PROTECTED]> wrote: > > I have a page imapemail.php which when first opened displays a form > (called frmEmailSubmit) with two list boxes for the Inbox and Outbox of > an IMAP mail account. When the user selects an item in a list box, the > form is submitted and the action is to call itself (ie > imapemail.php?MInboxID=12) and this second time round it just displays > the content of the mail. > > However I found that when the back button is used the form was still set > with the selection the user originally made. This has undesired effects > as if the user selects an item in the other list box without resetting > the form, values for both list boxes are passed (ie > imapemail.php?MInboxID=12&MSentID=4) and of course there is no way of > telling which mail to display. > > I thought to resolve this using:- > > <body onload="frmEmailSubmit.reset();"> > > However this only appears to work in IE not Firefox. Can anyone suggest > a way of ensuring that when the back button is used, imapemail.php > displays itself with the default form values? > > Charlie >
This is not strictly PHP/MySQL but what you need is a javascript function that clears one list box when the other is selected.
