Usa la sentencia while y trata de ver mas documentación sobre las funciones que utilizas.
			Código (php) [Seleccionar] 
<?php
error_reporting(E_ALL ^ E_NOTICE);
session_name('pLogin');
session_set_cookie_params(2*7*24*60*60);
session_start();
 
include("function.php");
include("connect.php");
include("getdata.php");
 
$query = mysql_query("select * from prueba where usuario='$usuario'");
while($getname = mysql_fetch_array($query))
{
   $firstname = $getname["firstname"];
   $lastname =$getname["lastname"];
   $gender= $getname["sexo"];
   $estadocivil=$getname["estadocivil"];
   $pais=$getname["pais"];
}
?>