Ver Mensaje Individual
  #9 (permalink)  
Antiguo 06/01/2006, 09:44
Avatar de helthon
helthon
 
Fecha de Ingreso: junio-2005
Ubicación: Lima
Mensajes: 549
Antigüedad: 18 años, 10 meses
Puntos: 7
Codigo completo

HOla Cluster ahora si estoy confundido

Revise bien los bucles y todos estan abiertos y cerrados ({}) en cuanto a las conexiones Quieres decir que por cada consulta que realice tenga que hacer uan conexion diferente. es decir asi :

Código PHP:
<? 
$varstatus 
$row["status"];
//segunda conexion abierta
$link2=mysql_connect ("localhost""interpa""123") or die ('I cannot connect to the database because: ' mysql_error());
              
mysql_select_db ("interpac_interpacifc");
              
//consulta para los radios
              
$resultado=mysql_query("SELECT * FROM status") or die('La consulta fall&oacute;: ' mysql_error());
                
//segundo bucles
                
while ($row mysql_fetch_array($resultado)) 
                {   
                    if (
$row['tipo'] == $varstatus)
                    { 
                    echo 
"<input type=radio name=statust value=".$row['tipo']." class='textoBarra10pt' checked> ".$row['tipo']." ";   
                    }else{ 
                    echo 
"<input type=radio name=statust value=".$row['tipo']." class='textoBarra10pt'> ".$row['tipo']." ";   
                    } 
                }
//cierro la conexion
                
mysql_close($link2); 
              
?>

Creo que me estoy enredando en algo tan sencillo

Te vuelvo a pasar mi codigo segun lo que te entendi y otra vez gracias por la pasciencia

Código PHP:
<?php
//require_once('../confdb/conectar.php');
include_once '../confdb/funcion.php';
?>
<link href="../css/estiloadmin.css" rel="stylesheet" type="text/css">
<table width="720" height="299" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td height="33" colspan="2" class="titulos"> edit files operation</td>
  </tr>
  <tr>
    <td width="131" height="254" valign="bottom"><img src="../imagenes/admin/home_24.jpg" width="225" height="254"></td>
    <td valign="top"><table width="476" border="0" align="center" cellpadding="0" cellspacing="0">
      <tr>
        <td height="30" class="interiorcontenido"> Please fill in the fields below to register for a new account. </td>
      </tr>
      <tr>
        <td width="600"><form method="post" enctype="multipart/form-data" name="form1" action="index.php?admin=operationsave">
        <?
$dbh
=mysql_connect ("localhost""interpa""123") or die ('I cannot connect to the database because: ' mysql_error());
            
mysql_select_db ("interpac_interpacifc");
            
            
$idprod=$_GET['id'];
            
            
$result=mysql_query("select * from opertation  where idprod = $idprod" ,$dbh);
            
//primer bucle
            
while($row=mysql_fetch_array($result))
            {
            
?>
          <table width="475" border="0" align="center" cellpadding="2" cellspacing="2">
            <tr>
              <td class="interiorcontenido"><?php echo '<input name="iddetails" type="hidden" value="'.$idprod.'" >'//id tabla?></td>
              <td><?php echo '<input name="idclie" type="hidden" value="'.$idclie.'" >'// id cliente?></td>
            </tr>
            <tr>
              <td width="111" class="interiorcontenido"><div align="right">Customer</div></td>
              <td width="350">
              <span class="textoBarra10pt">
              <?php
              
//aqui va para que aparezcan los nombres de los clientes
            // $clientes = mysql_query("select * from clientes  where idclie=$idprod ") or die('La consulta fall&oacute;: ' . mysql_error());
                /*                  while($row=mysql_fetch_array($clientes))
                {
                echo $row["nombres"] ;
                }
*/
              
?>
              </span> 
              </td>
            </tr>
            <tr>
              <td class="interiorcontenido"><div align="right">Delivery Day </div></td>
              <td class="textoBarra10pt"><? echo $row["deliveryday"];?></td>
            </tr>
            <tr>
              <td class="interiorcontenido"><div align="right">Nro Document</div></td>
              <td><span class="textoBarra10pt"><? echo $row["nrodoc"];?></span></td>
            </tr>
            <tr>
              <td class="interiorcontenido"><div align="right">Status</div></td>
              <td class="textoBarra10pt">
              <? 
              $varstatus 
$row["status"];
              
//segunda conexion abierta
$link2=mysql_connect ("localhost""interpa""123")  or die ('I cannot connect to the database because: ' mysql_error());
              
mysql_select_db ("interpac_interpacifc");
              
//consulta para los radios
              
$resultado=mysql_query("SELECT * FROM status") or die('La consulta fall&oacute;: ' mysql_error());
                
//segundo bucles
                
while ($row mysql_fetch_array($resultado)) 
                {   
                    if (
$row['tipo'] == $varstatus)
                    { 
                    echo 
"<input type=radio name=statust value=".$row['tipo']." class='textoBarra10pt' checked> ".$row['tipo']." ";   
                    }else{ 
                    echo 
"<input type=radio name=statust value=".$row['tipo']." class='textoBarra10pt'> ".$row['tipo']." ";   
                    } 
                }
                
mysql_close($link2); 
              
?>
              </td>
            </tr>
            <tr>
              <td class="interiorcontenido"><div align="right">Responsible Person </div></td>
              <td><input name="person" type="text" class="btxtform" id="person" value="<? echo $row["respons"];?>" size="30"></td>
            </tr>
            <tr>
              <td valign="top" class="interiorcontenido"><div align="right">Details</div></td>
              <td><textarea name="details" cols="50" rows="8" class="btxtform" id="details"><? echo $row["details"];?></textarea></td>
            </tr>
            <tr>
              <td class="interiorcontenido"><div align="right">Name Image </div></td>
              
              <td class="textoBarra10pt"><? echo $row["view"]; ?></td>
              
            </tr>
            <tr>
              <td class="interiorcontenido"><div align="right">Image</div></td>
              <td><input name="fichero" type="file" class="btxtform" size="38"></td>
            </tr>
            <tr>
              <td>&nbsp;</td>
              <td><input name="Submit" type="submit" class="btform" value=":: SAVE REGISTER :: ">
                <input name="Submit2" type="reset" class="btform" value=":: RESET ::"></td>
            </tr>
          </table>
          </form> 
<?
}
mysql_free_result($result);
mysql_close($dbh);
?>
</td>
      </tr>
    </table></td>
  </tr>
</table>
__________________
HELTHON FUENTES
FLORERIA FLORES PERU Floresperu.com.pe
Garantizamos que cada entrega de flores será de la más alta calidad y frescura