I save the form elements to a file and the following is working as expected.
$t_str .= "viewMandatory=".$_GET['viewMandatory'] ."\n";
But what I need is that if $_GET is set only then it should be appended to "t_str" string.
If no value for viewMandatory is received from the form, it should print nothing. How to add this check to the above statement?