I have a script that has a default value for a checkbox, lets say it's checked.
now when the user submits, if the data does not validate, I want to restore the data that was just submitted.
if( isset( $_request['MyChkBox'] ))
{
// this means checkbox was selected
}
else
{
// however this could mean that the checkbox was unchecked inwhich case it should remain unchecked
// OR the form may not have been submitted in which case the checkbox should be checked (default)
}
Is there a way to check if the form was submitted without checking to see if other form data was submitted?
i tried
if( isset( $_REQUEST ))
but it always returns true.