$checkbox would never equal checked--the value you set for it was checkbox. If you wanted it to equal checked, you would have to change the value in your form to
<input name="checkbox" type="checkbox" value="checked">
Which is why your if statement wouldn't work the way you want it to. It would always
echo "<input type=\"file\" name=\"miconfname\"><br><br>";
What exactly are you trying to do?
Your code would also produce a parse error
."<input name="checkbox" type="checkbox" value="checkbox">";
The entire input tag is within double quotes, but then you have double quotes within that. You can't have double quotes within doublequotes. Also, you have a period right before the opening quote, so I'm assuming you're concatenating (adding onto) by using the <input> tag. To get those quotes within quotes to work, you either need to escape them () or use single quotes.
echo "<input name=\"checkbox\" type=\"checkbox\" value=\"checked\">";
// or
echo "<input name='checkbox' type='checkbox' value='checked'>";
Cgraz