Ho realizzato una calcolatrice in php.Mi succede che non funziona più su windows 7.Nel file php.ini ho settato register global su on.Però non funziona come previsto.Vi posto il codice per comodità:
codice:

<?php


$currentNum = "";
if( isset($_GET['display']) && ctype_digit($_GET['display']) ){
    $currentNum .= $_GET['display'];
}
if( isset($_GET['num']) && ctype_digit($_GET['num']) ){
    $currentNum .= $_GET['num'];
}
 

switch($_GET['num'])
{
	case '*':
	 $_GET['op']='*';
	 $_GET['valUno']=$currentNum;
	$currentNum="";
    
	break;
	case '/':
	 $_GET['op']='/';
	 $_GET['valUno']=$currentNum;
	$currentNum="";
    
	break;
	case '+':
	 $_GET['op']='+';
	$_GET['valUno']=$currentNum;
	$currentNum="";
	break;
	case '-':
	 $_GET['op']='-';
	 $_GET['valUno']=$currentNum;
	$currentNum="";
	break;
	case 'C':
	$currentNum="";
	break;
	case '=':
     $_GET['valDue']=$currentNum;
         
	if($_GET['op']=='*')
    {
		$currentNum=$_GET['valUno']*$_GET['valDue'];
	}
	elseif($_GET['op']=='/')
	{
		$currentNum=$_GET['valUno']/$_GET['valDue'];
	}
	elseif($_GET['op']=='+')
	{
		$currentNum=$_GET['valUno']+$_GET['valDue'];
	}
	elseif($_GET['op']=='-')
	{
		$currentNum=$_GET['valUno']-$_GET['valDue'];
	}
	break;
}

?>


<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-type" content="text/html;charset=utf-8">
    <title>Esempio calcolatrice</title>
</head>
<body>
    <form  method="get" action="calcolatrice1.php" >


<input type="text" name="display" value="<?php echo $currentNum; ?>" /></p>
        


            <input type="submit" name="num" value="7"/>
            <input type="submit" name="num" value="8"/>
            <input type="submit" name="num" value="9"/>
            <input type="submit" name="num"  value="*" />

            <input type="submit" name="num" value="4"/>
            <input type="submit" name="num" value="5"/>
            <input type="submit" name="num" value="6"/>
            <input type="submit" name="num" value="+"/>

            <input type="submit" name="num" value="1"/>
            <input type="submit" name="num" value="2"/>
            <input type="submit" name="num" value="3"/>
            <input type="submit" name="num" value="/"/>

            <input type="submit" name="num" value="C" />
            <input type="submit" name="num" value="0"/>
            <input type="submit" name="num" value="="/>
            <input type="submit" name="num" value="-"/>
            
    </form>
</body>
</html>