Bocket Calculator
if (array_key_exists("bc", $_REQUEST)) { $calc = ereg_replace("[^0-9.+*/-]*","",htmlspecialchars($_REQUEST["bc"])); eval("\$res = $calc;"); print("
\n"); } else { print("
\n"); } ?>
if (array_key_exists("bc", $_REQUEST)) { print("$calc = $res"); } ?>
Kaluan Kalhaan
$Id: bc.php,v 1.2 2013/04/02 15:41:18 ams Exp $