hola
 
hize una sola consulta el problem es que del archivo que envio los datos por post no me los reconoce ...osea recibe los dos ultimos que pertenecen a a una tabla los de la primera tabla no los utiliza :(  
 Código PHP:
    <?if (($tmp1=$_POST['idHito'])&&($tmp2=$_POST['fecha1'])&&($tmp4=$_POST['idHito2'])&&($tmp3=$_POST['fecha2'])&&($table1=$_POST['table']) &&($table2=$_POST['table2'])){
    
        $result=mysql_query("SELECT AB.cod_sitio, $table1.fecha
                            FROM $table1, AB
                            WHERE $table1.fecha
                            BETWEEN '".$tmp2."'
                            AND '".$tmp3."'
                            AND ab.idab = $table1.idab
                            AND $table1.idhito = '".$tmp1."'
                            UNION (
                            
                            SELECT AB.cod_sitio, $table2.fecha
                            FROM $table2, planificar, AB
                            WHERE ab.idab = $table2.idab
                            AND $table2.idhito = '".$tmp4."');");?>