una pregunta en el codigo:
Código PHP:
if($_POST['modificar']){
$sqlsel = "select * from producto order by nombre desc";
$ressel = mysql_query($sqlsel);
?>
<form method="POST" action="<?php $PHP_SELF ?>">
<table width="251" border="0" align="center">
<tr>
<td class="Estilo2">Código:</td>
<td><input type="text" name="codigobuscar"/>
</td>
<td><input type="submit" name="buscar" value="buscar"/>
</td>
</tr>
</table>
</form>
<? } else {
if ($_POST['buscar']){
$sqlbusc = 'select * from producto where codigo="'.$_POST['codigobuscar'].'"';
$resbusc = mysql_query($sqlbusc);
$resbuscnum = mysql_num_rows($resbusc);
if ($_POST["delete"]) {
$sqldelete = "delete from gespuser where gespuserlogi='".$_POST["row"] ."'";
$resdelete = mysql_query ($sqldelete);
}
$sql2 .= " order by gespuserlogi LIMIT $ini, $end";
$result2 = mysql_query($sql2);
if ($resbuscnum==1) {
while($rowbusc=mysql_fetch_row($resbusc)){
?>
<form enctype="multipart/form-data" method="POST" action="<?php $PHP_SELF ?>">
<table width="251" border="0" align="center">
<table width="251" height="179" border="0" align="center">
<tr>
<td class="Estilo2">codigo:</td>
<td><input type="text" name="codigo" readonly value="<? echo $rowbusc[0] ?>" /></td>
</tr>
<tr>
<td class="Estilo2">Nombre: </td>
<td><input type="text" name="nombremod" value="<? echo $rowbusc[1] ?>" /></td>
</tr>
<tr>
<td class="Estilo2">Unidades:</td>
<td><input type="text" name="stockmod" value="<? echo $rowbusc[4] ?>"/></td>
</tr>
<tr>
<td class="Estilo2">Precio Unidad:</td>
<td><input type="text" name="preciounidadmod" value="<? echo $rowbusc[3] ?>"/></td>
</tr>
<tr>
<td class="Estilo2">Precio Antiguo: </td>
<td><input type="text" name="precioantiguomod" value="<? echo $rowbusc[4] ?>"/></td>
</tr>
<tr>
<td class="Estilo2">Descripcion: </td>
<td><input type="text" name="descripcionmod" value="<? echo $rowbusc[2] ?>"/></td>
</tr>
<tr>
<td class="Estilo2">Foto: </td>
<td>
<?
$directorio = './prods/';
$extension = '.jpg';
$foto = $directorio.$rowbusc[0].$extension;
if(file_exists($foto))
echo "<img src='$foto' height=75 weight=75/>";
else
echo '<img src="./images/imgnd.jpg"height=75 weight=75/>';
?> </td>
</tr>
<tr>
<td colspan=2><input type="file" name="archivo_usuario" size=45>
<br /></td>
</tr>
<tr>
<td align="center" colspan="2"><input type="submit" name="modificar" value="modificar" />
</td>
</tr>
</table>
</form>
la unidades son de otra tabla como las podria mostra en ese formulario??
gracias.