PHP Mysql script error
===

I send data too this script from a C# script inside of Unity 3d . What I want to do is get the page to display the result of whatever  query   i end up running from it , and inside of Unity I get the text of that page and display it . 
This is a very jerryridged way of doing this , but i'm just starting with PHP and mysql
Here's the error that unity 3d gives me 
"Warning: mysql_result(): supplied argument is not a valid MySQL result resource in WEBSITE.com/newget.php on line 30" 

        <?php 
    
            $db = mysql_connect('host, user, pass') or die('Could not connect: ' . mysql_error()); 
    
            mysql_select_db('dbname') or die('Could not select database');
    
     
    
        $gotString = mysql_real_escape_string($_GET['GetString'], $db);
    
        
    
        $hash = $_GET['hash'];
    
        //SELECT * FROM table_name
    
        $real_hash = md5($gotString . $secretKey); 
    
     $secretKey="KeyHERE";
    
     
    
    $real_hash = md5($gotString . $secretKey); 
    
    $locString = "SELECT  A  FROM Quiz1 WHERE Question =  1";
    
    if($real_hash == $hash) {
    
    Compare() ; 
    
    }
    
    function Compare () {
    
    if ($gotString == "1B" )
    
    {
    
     
    
    $result = mysql_query("SELECT  B  FROM Quiz1 WHERE Question =  1")  or die(mysql_error()); 
    
    }
    
    else 
    
    {
    
    $result = mysql_query("SELECT  A  FROM Quiz1 WHERE Question =  1")  or die(mysql_error()); 
    
    }
    
    }
    
     
    
    Print( $result) ;
    
     
    
     ?>