Ver Mensaje Individual
  #4 (permalink)  
Antiguo 27/05/2010, 08:05
jonnyalex_1990
 
Fecha de Ingreso: mayo-2010
Mensajes: 153
Antigüedad: 14 años
Puntos: 0
Exclamación Respuesta: No me pasa el dato

Código PHP:
<?
session_start
();
if(!isset(
$_SESSION['USU_LOGIN'])and !isset($_SESSION['USU_CONTRASENA'])) //comprobamos que alguien inicio sesion
{        
    
header("location:../index.php");
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<script language="javascript">
//Funcion pon_prefijo lleva valores del cliente seleccionado
function pon_prefijo(empresa) 
{
    parent.opener.document.frmcliente.txtcodcliente.value=empresa;
    parent.window.close();
}
</script>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Documento sin título</title>
</head>
<body>
<?php
require_once("../conexionia.php");
if(
$nacionalidad=='Exterior')
   {
          
$consulta=mysql_query("SELECT * FROM empresasint");
          
$resultados=mysql_num_rows($consulta);
          
$datos=mysql_fetch_array($consulta);
   }
    else
       {
        
$consulta=mysql_query("SELECT * FROM empresas");
         
$resultados=mysql_num_rows($consulta);
          
$datos=mysql_fetch_array($consulta);    
          }
?>
<table width="200" border="1" align="center">
  <tr>
    <td><label>
      <input type="text" name="textfield" id="textfield" />
    </label></td>
    <td><label>
      <input type="submit" name="button" id="button" value="Buscar empresa" />
    </label></td>
  </tr>
</table>
<br />
<table width="594" border="1" align="center">
  <tr>
    <td width="401" align="center">Empresas <?php echo "$nacionalidad"?></td>
    <td width="70" align="center">Seleccionar</td>
  </tr>
  <?php
    
while($row=mysql_fetch_assoc($consulta))
   {
       
$empresa=$row['empresasnal'];
  
?>
<tr>
<td><?php echo $empresa;?></td>
<td>
<div align="center">
<a href="javascript:pon_prefijo(<?php echo $empresa?>)">
<img src="../img/convertir.png" border="0" title="Seleccionar"></a></div></td>
</tr>
<?php
   
}
?>
</table>
</body>
</html>