在MySql DB Collection之后更改值

I currently collect data from a mysql table then post the data using Curl. The values are :

title : surname : email
Max     Test      max@test.com

How do i collect the data then change the feild names for post to :

MainTitle : Lastname : MainEmail
Max     Test      max@test.com

this is my current code :

$conn = mysql_connect("localhost","max","pass");
$db   = mysql_select_db("maindb",$conn);
$query = "SELECT * FROM app2 ";
$result = mysql_query($query) or die(mysql_error());

 $url = "http://test.com?"; 
 while($row = mysql_fetch_assoc($result)) {

        $input = urldecode(http_build_query( $row ));

        $ch = curl_init();                    
        curl_setopt($ch, CURLOPT_URL, $url);
        curl_setopt($ch, CURLOPT_POST, true);  
        curl_setopt($ch, CURLOPT_POSTFIELDS, $input); 
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); 
        curl_setopt($curl_exect, CURLOPT_HEADER, true);

        $output = curl_exec ($ch); 

        curl_close ($ch); 

        var_dump($output); 

        echo "</br>";
    }

There are several possible ways to rename the fields, but the easiest may be to do it within your SQL statement:

$query = "SELECT title AS `MainTitle`, surname AS `Lastname`, email AS `MainEmail` 
          FROM app2";