Ver Mensaje Individual
  #3 (permalink)  
Antiguo 15/06/2004, 08:45
peluo100
 
Fecha de Ingreso: junio-2004
Mensajes: 5
Antigüedad: 19 años, 10 meses
Puntos: 0
Ha la primera pregunta la funcion mysql_fetch_array() devuelve un array asociativo cuyo indices son los nombre de los campo de la tabla ej:
salida['nombre_campo'];
Para usar como indices numeros prueba con la funcion mysql_fetch_row()

----------------------------------------------------------------
Para la segunda duda prueba con esto.
<html>


<?
php
include (conex.phtml
);
$busqueda=conectarse
();

$DNI=$_GET['DNI'
];

$busqueda="SELECT * FROM clientes WHERE DNI ='$DNI'"
;
$resultado_b=mysql_query($busqueda
);
if(
$row=mysql_fetch_row($resultado_b
)) :?> /*fijate en los dos puntos y cierre el php*/
<form name=formulario method=post //action=modifica_registro.php//>
<input type=hidden name='DNI' value='$DNI'>

<table border='0' width='769' cellpadding='0' cellspacing='1' >
<input type='HIDDEN' name='id' value='$row
[2]
' size='10' maxlength='10'>

<tr>
<td width='92' bgcolor='#CCCCCC' height='21'><b>Socios</b></td>
<td width='568' height='21'></td>
</tr>
<tr>
<td width='92' height='28'>&nbsp;Nombre&nbsp;</td>
<td width='568' height='28'>&nbsp; <input type=text name='nombre'value='$row
[0]
' size='75' maxlength='25' ></td>
</tr>
<tr>
<td width='92' height='34'>&nbsp;Apellidos&nbsp;</td>
<td width='568' height='34'> &nbsp; <input type=text name='apellidos' value='$row
[8]
' size='75' maxlength='50'></td>
</tr>
<td width='92' height='34'>&nbsp;Telefono&nbsp;</td>
<td width='568' height='34'> &nbsp; <input type=text name='telefon' value='$row
[1]
' size='75' maxlength='50'></td>
</tr>
<tr>
<td width='92' height='34'>&nbsp;fecha de inscripcion&nbsp;</td>
<td width='568' height='34'>&nbsp; <input type=text name='fecha' value='$row
[3]
' size='6' maxlength='25'></td>
</tr>
<tr>
<td width='92' height='34'>&nbsp:Direccion:&nbsp</td>
<td width='568' height='34'>&nbsp; <input type=text name='direccion' size='5' maxlength='11' value='$row
[4]
'></td>
</tr>
<tr>
<td width='568' height='2'>&nbsp;email &nbsp;</td>
<input type=text name='email' size='23' maxlength='35' value='$row
[5]
'>

<td width='92' height='2'>&nbsp;curso:</td>
<input type=text name='curso' size='5' maxlength='11' value='$row
[6]
'>&nbsp;

<td width='92' height='2'>&nbsp;edad:</td>
<input type=text name='curso' size='5' maxlength='11' value='$row
[7]
'>&nbsp;

<INPUT TYPE='submit' NAME='accion' VALUE='Devolucion libro'>
</td>
</tr>
</table>
</form>

<? endif ;?> //cierra el if de esta forma

</html>