esto es una version resumida de todo el codigo que utilizo, como se puede ver llamo al otro fomulario usando el metodo de include.
Muchas gracias por vuestro tiempo.
Código PHP:
<?php $fecha= date ( "j/n/Y" ); ?>
<html>
<head>
<title>- Administrar albaranes</title>
<link href="template/estyle.css" rel="stylesheet" type="text/css">
</head>
<body>
<form name="form1" method="post" action="build.php" target="_blank">
<table width="100%" height="26%" id="tabla">
<tr>
<td width="20%" height="21">Cliente</td>
<td width="6%"><?php
$hand = mysql_connect('localhost', 'root', '123456');
mysql_select_db("erp", $hand);
$qry = mysql_query("select * from clientes", $hand);
$opt = "";
while ($rec = mysql_fetch_array($qry))
{
if ( $rec['cif'] == 0 )
$opt .= "<option value=".$rec['cif']." selected>".$rec['razonsocial']."</option>\n";
else
$opt .= "<option value=".$rec['cif'].">".$rec['razonsocial']."</option>\n";
}
echo <<< HTML
<select size="1" name="clientes" tabindex="0">
$opt
</select>
HTML;
?></td>
<td width="10%"></td><td width="31%" colspan="2"> </td>
</tr>
<tr>
<td height="21" align="center">
<?php include ('lista.php');?></td>
<td align="center">Proyectos<br /><?php
$qry4 = mysql_query("select * from proyectos", $hand);
$opt4 = "";
while ($rec4 = mysql_fetch_array($qry4))
{
if ( $rec4['id'] == 0 )
$opt4 = $opt4."<option value=".$rec4['id']." selected>".$rec4['nombre']."</option>\n";
else
$opt4 = $opt4."<option value=".$rec4['id'].">".$rec4['nombre']."</option>\n";
}
echo <<< HTML
<select size="1" name="proyectos" tabindex="0">
$opt4
</select>
HTML;
?></td>
<td></td></tr>
<tr><td height="21">Producto 1</td><td>
<a target="_blank" onClick="window.open('search.php', 'searcher', 'scrollbars=yes,height=600,width=800', false);">Buscar</a>
<?php
$qry5 = mysql_query("select * from articulos order by id", $hand);
$opt5 = "";
while ($rec = mysql_fetch_array($qry5))
{
if ( $rec['id'] == 0 )
$opt5 .= "<option value=".$rec['id']." selected>".$rec['articulo']."</option>\n";
else
$opt5 .= "<option value=".$rec['id'].">".$rec['articulo']."</option>\n";
}
echo <<< HTML
<select size="1" name="articulos1" id="articulos1" tabindex="0">
$opt5
</select>
HTML;
?></td>
<td><input name="pr1" type="text" id="pr1" value="1" size="3"></td><td>Articulo
<input name="obejofalso1" type="text" id="obejofalso1" size="20" /></td><td width="33%">Precio editado
<input name="preciofalso1" type="text" id="preciofalso1" size="7" /></td>
</tr>
<tr><td height="21">Producto 2</td><td><?php
$qry5 = mysql_query("select * from articulos order by id", $hand);
$opt5 = "";
while ($rec = mysql_fetch_array($qry5))
{
if ( $rec['id'] == 0 )
$opt5 .= "<option value=".$rec['id']." selected>".$rec['articulo']."</option>\n";
else
$opt5 .= "<option value=".$rec['id'].">".$rec['articulo']."</option>\n";
}
echo <<< HTML
<select size="1" name="articulos2" tabindex="0">
$opt5
</select>
HTML;
?></td>
<td><input name="pr2" type="text" id="pr2" value="0" size="3"></td><td>Articulo
<input name="obejofalso2" type="text" id="obejofalso" size="20" /></td><td>Precio editado
<input name="preciofalso2" type="text" id="preciofalso2" size="7" /></td>
</tr>
<tr><td height="21">Producto 3</td><td><?php
$qry5 = mysql_query("select * from articulos order by id", $hand);
$opt5 = "";
while ($rec = mysql_fetch_array($qry5))
{
if ( $rec['id'] == 0 )
$opt5 .= "<option value=".$rec['id']." selected>".$rec['articulo']."</option>\n";
else
$opt5 .= "<option value=".$rec['id'].">".$rec['articulo']."</option>\n";
}
echo <<< HTML
<select size="1" name="articulos3" tabindex="0">
$opt5
</select>
HTML;
?></td>
</tr></table>
<br>
<input name="fecha" type="hidden" id="fecha" value="<?php echo $fecha ?>">
<label>
<input type="submit" name="button" id="button" value="Enviar">
</label>
<label>
<input type="reset" name="button2" id="button2" value="Restablecer">
</label>
</form>
</body>
</html>