$year = trim($_POST['year']); $price = trim($_POST['price']); $ram = trim($_POST['ram']); $processor = trim($_POST['processor']); $videocard = trim($_POST['videocard']); $addProduct->addComp($products, $make, $model, $year, $price, $ram, $processor, $videocard); echo "<br/><br/>The computer is added. Thank you!"; break; case 'printers': $make = trim($_POST['make']); $model = trim($_POST['model']); $year = trim($_POST['year']); $price = trim($_POST['price']); $type = trim($_POST['type']); $numOfPages = trim($_POST['numOfPages']); $addProduct->addPrinter($products, $make, $model, $year, $price, $type, $numOfPages); echo "<br/><br/>The printer is added. Thank you!"; break; case 'routers': $make = trim($_POST['make']); $model = trim($_POST['model']); $year = trim($_POST['year']); $price = trim($_POST['price']); $frequency = trim($_POST['frequency']); $addProduct->addRouter($products, $make, $model, $year, $price, $frequency); echo "<br/><br/>The router is added. Thank you!"; break; default: 'Error'; } ?>