<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2">
<title>Działania</title>
</head>
<body>
<p>
<?php
if(isSet($_GET['A']) && isSet($_GET['B']) && isSet($_GET['dzialanie'])){
  if(!is_numeric($_GET['A']) || !is_numeric($_GET['B'])){
    echo "Nieprawidłowe parametry.";
  }
  else{
    $op1 = $_GET['A'];
    $op2 = $_GET['B'];
    if($_GET['dzialanie'] == 'plus'){
      echo "$op1 + $op2 = ", $op1 + $op2;
    }
    else if($_GET['dzialanie'] == 'minus'){
      echo "$op1 - $op2 = ", $op1 - $op2;
    }
    else if($_GET['dzialanie'] == 'razy'){
      echo "$op1 * $op2 = ", $op1 * $op2;
    }
    else if($_GET['dzialanie'] == 'dzielenie'){
      echo "$op1 / $op2 = ", $op1 / $op2;
    }
    else{
      echo "Nipawidłowy operator.";
    }
  }
}
?> 
</p>
</body>
</html>