OP is referencing $size which was never created. So OP will see Undefined Index error for that line. And then OP is trying to get $_POST variables on a $_GET request so even more Undefined Index errors. Not only that, the calculation is done after the logic check thus not giving the correct answer.
I think what you want is a form that can be used with the processing code. If that is the case it seems like there is much online similar to what you are doing. In particular this looked promising.
However, if you search the phrase on google “creating a php form for a pizza” there is a bunch of stuff. Including a youtube video for a simple pizza form.
There are also problems with processing code as spaceshiptrooper pointed out. Its a little odd for a beginner assignment to begin with the processing code than the form html. I would think it should be the other way around.