PHP - consultas

 
Vista:
sin imagen de perfil

consultas

Publicado por javier (3 intervenciones) el 28/08/2013 20:40:45
buen dia

soy nuevo en le mundo de la programacion y tengo un nuevo proyecto

debo hacer consultas por medio de un dato en un formulario en php
ejemplo:
si consulto por documento de identidad me muestre una serie de datos que traigo de la base de datos y si hay mas de un dato que me pueda mostrar todos ya sea uno por uno o una opcion de seleccion individual

muchas gracias por su ayuda



Nota: no pretendo que alguien lo haga por mi solo quiero aprender como se hacer, por eso pido ayuda y me indique donde debo consultar o leer

de antemano muchas gracias por la colaboracion
[email protected]
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder
Imágen de perfil de xve
Val: 3.943
Oro
Ha mantenido su posición en PHP (en relación al último mes)
Gráfica de PHP

consultas

Publicado por xve (6935 intervenciones) el 28/08/2013 21:44:07
Hola javier, exactamente, que necesitas, que te expliquemos como funciona la consulta a la base de datos? o como mostrar el resultado?
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar

consultas

Publicado por javier (3 intervenciones) el 29/08/2013 17:55:54
si me hace el favor y me puedes enseñar como funciona la consulta a la BD y como mostrar el resultado

gracias
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar
sin imagen de perfil

consultas

Publicado por Sergio (9 intervenciones) el 29/08/2013 03:17:00
Javier haber si nos pones algo de codigo trabajado de tu parte o si no tienes nada para poderte apoyar??
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar

consultas

Publicado por javier (3 intervenciones) el 29/08/2013 18:00:18
esto eslo que tengo pero no se como hacer para que solo me muestre los datos que le pido

¿que estoy haciendo mal?

gracias


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
<html>
<title>Consulta por Cedula</title>
<head>
 
<H1>Consulta  por cedula</h1>
 
<br> <A href="index.php">INICIO</A> <br>
 
</head>
<body>
 
<table width="800" border="0">
 <tr>
<td >Numero de Cedula</td>
      <tr>
      <td>
	  <label>
        <input  type="text" name="NroExpe" id="NroExpe" size="35" maxlength="40">
      </label>
       </td>
	   </tr>
</tr>
  <tr>
    <td >Nro.Expedientes</td>
    <td >Id_usuario</td>
    <td >Nombre</td>
    <td >Apellidos</td>
    <td >Direccion</td>
    <td >Ciudad></td>
    <td >&nbsp;</td>
  </tr>
 
  <tr>
      <td>
      <label>
        <input  type="text" name="NroExpe" id="NroExpe" size="35" maxlength="40" value="<?php echo $expedientes;?>">
      </label>
       </td>
             <td>
 
      <label>
        <input type="text" name="Id_usuario" id="Id_usuario" size="35" maxlength="40" value="<?php echo $Id_usuario;?>">
      </label>
          </td>
 
    <td>
      <label>
        <input type="text" name="Nombre" id="Nombre" size="35" maxlength="40" value="<?php echo $nombre;?>">
 
      </label>
    </td>
    <td>
      <label>
        <input type="text" name="Apellido" id="Apellido" size="35" maxlength="40" value="<?php echo $apellido;?>">
      </label>
    </td>
    <td>
      <label>
        <input type="text" name="Direcc" id="direccion" size="35" maxlength="40" value="<?php echo $direccion;?>">
      </label>
   </td>
    <td>
      <label>
        <input type="text" name="Ciudad" id="Ciudad" size="35" maxlength="40" value="<?php echo $ciudad;?>">
      </label>
    </td>
  </tr>
 
      <tr>
    <td><div align>Nro_Comparendo</div></td>
    <td><div align>Fecha Comparendo</div></td>
    <td><div align>valor multa</div></td>
    <td><div align>Placa</div></td>
    <td><div align>Resolucion</div></td>
    <td><div align>Fecha Resolucion</div></td>
 
  </tr>
   <tr>
    <td><label>
        <input type="text" name="nro_comparendo" id="nro_comparendo" size="35" maxlength="40" value="<?php echo $nrocomparendo;?>">
      </label></td>
    <td><label>
        <input type="text" name="Fecha_Comparendo" id="Fecha_Comparendo" size="35" maxlength="40" value="<?php echo $fecha_comparendo;?>">
      </label></td>
       <td><label>
      <input type="text" name="valor_multa" id="valor_multa" size="35" maxlength="40" value="<?php echo $valor_multa;?>">
    </label>
   </td>
     <td>
      <label>
        <input type="text" name="Placa" id="Placa" size="35" maxlength="40" value="<?php echo $Placa;?>">
      </label>
    </td>
    <td><label>
        <input type="text" name="Resolucion" id="Resolucion" size="35" maxlength="40" value="<?php echo $resolucion;?>">
      </label></td>
    <td><label>
        <input type="text" name="Fecha_resolucion" id="Fecha_resolucion" size="35" maxlength="40" value="<?php echo $fecha_resolucion;?>">
      </label></td>
  </tr>
  <tr>
    <td><div align>nroAP</div></td>
    <td><div align>fechaAp</div></td>
    <td><div align>Notificacion_AP</div></td>
    <td><div align>fechanotificacionAp</div></td>
    <td><div align>valorAP</div></td>
    <td><div align>valor_APIncumplido</div></td>
 
 
    </tr>
  <tr>
 
  <td><label>
        <input type="text" name="nroAP" id="nroAP" size="35" maxlength="40" value ="<?php echo $nroAP;?>">
      </label>
    </td>
    <td><label>
        <input type="text" name="fechaAp" id="fechaAp" size="35" maxlength="40" value ="<?php echo $fechaAp;?>">
      </label>
    </td>
    <td><label>
        <input type="text" name="notificacionAP" id="notificacionAp" size="35" maxlength="40" value="<?php echo $notificacionAp;?>">
      </label>
  </td>
 
    <td><label>
        <input type="text" name="fecha_AP" id="fecha_AP" size="35" maxlength="40" value ="<?php echo $fechanotificacionAp;?>">
      </label>
    </td>
    <td><label>
        <input type="text" name="ValorAp" id="ValorAp" size="35" maxlength="40" value="<?php echo $valorAp;?>">
      </label>
    </td>
       <td><label>
        <input type="text" name="Valor_ApIncumplido" id="Valor_ApIncumplido" size="35" maxlength="40" value ="<?php echo $valorApInc;?>">
      </label>
      </td>
  </tr>
  <tr>
  <tr>
 
    <td colspan="20" bgcolor="#0051"><div align="center"></div></td>
 
    </tr>
  </tr>
  <tr>
 
  <td><div align>Idresmenor</div></td>
    <td><div align>Nombre_Responsable</div></td>
    <td><div align>Apelldio_responsable</div></td>
    <td><div align>Direccion_Responsable</div></td>
    <td><div align>Telefono_responsable</div></td>
   </td>
   </tr>
    <label>
       <td>
        <input type="text" name="idresmenor" id="idresmenor" size="35" maxlength="40" value="<?php echo $idresmenor;?>">
      </label>
  </td>
    <td><label>
        <input type="text" name="Nombre_Responsable" id="Nombre_Responsable" size="35" maxlength="40" value="<?php echo $nombreresp;?>">
      </label></td>
    <td>
    <label>
        <input type="text" name="Apellido_Responsable" id="Apellido_Responsable" size="35" maxlength="40" value="<?php echo $apellidoresp;?>">
      </label></td>
      <td>
    <label>
        <input type="text" name="Direccion_Responsable" id="Direccion_Responsable" size="35" maxlength="40" value="<?php echo $direccionresp;?>">
      </label></td>
    <td>
    <label>
        <input type="text" name="Telefono_Responsable" id="Telefono_Responsable" size="35" maxlength="40" value="<?php echo $telefonoresp;?>">
      </label></td>
       <td>&nbsp;</td>
        <td>&nbsp;</td>
         </tr>
           <tr>
          <td colspan="7" bgcolor="#0066FF"><div align="center"></div></td>
  </tr>
    </tr>
  <tr>
  <td><div align>Fecha_Mandamiento</div></td>
    <td><div align>Fecha_notificacion_mandamiento</div></td>
    <td><div align>fecha_publicacion</div></td>
    <td><div align>Numero_recibo</div></td>
    <td><div align>fecha_Recibo</div></td>
    </tr>
    <td><label>
        <input type="text" name="fecha_mandamiento" id="fecha_mandamiento" size="35" maxlength="40" value="<?php echo $fecha_mandamiento;?>">
      </label>
  </td>
    <td><label>
        <input type="text" name="Fecha_notificacion_mandamiento" id="fechanotimanda" size="35" maxlength="40" value="<?php echo $fechnotimanda;?>">
      </label>
  </td>
  <td><label>
        <input type="text" name="Fecha_publicacion" id="Fecha_publicacion" size="35" maxlength="40" value="<?php echo $fechapublicacion;?>">
      </label>
  </td>
    <td><label>
        <input type="text" name="numero_recibo" id="numero_recibo" size="35" maxlength="40" value="<?php echo $nro_recibo;?>">
      </label></td>
    <td>
    <label>
        <input type="text" name="fecha_recibo" id="fecha_recibo" size="35" maxlength="40" value="<?php echo $fecharecibo;?>">
        <html>
      </label></td>
 
 
    <td>&nbsp;</td>
  </tr>
 <tr>
  <tr>
   	 <tr>
  <td><div align="center">Observaciones</div></td>
  <td><div align="center">Estado Cobro</div></td>
 
 
    <tr>
       <td><label>
         <textarea name="Observaciones_texto" id="Observaciones_texto" cols="45" rows="5"><?php echo $observaciones;?></textarea>
       </label></td>
       <td><label>
         <select name="EstadoCobro_Combo" id="EstadoCobro_Combo<SELECT NAME="EstadoCobro"><OPTION>Titulo Ejecutivo<OPTION SELECTED>Auto de archivo<OPTION>Notificacion Por Aviso<OPTION>Revocatoria Directa<OPTION>Prescripcion<OPTION>Medidas Cautelares
        
	</SELECT>
         </select>
       </label></td>
  </table>
  <label>
    <input type="submit" value="<<" />
  </label>
  
</table>
  <label>
    <input type="submit" value="Buscar" />
  </label>
  
  
</table>
  <label>
    <input type="submit" value="Guardar" />
 </label>

</table>
  <label>
    <input type="submit" value="Modificar" />
  </label>

</table>
  <label>
    <input type="submit" value=">>" />
  </label>

</tr>
 </tr>
   </tr>
   
  	  
</form>
</form>



</body>
</html>
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar
Imágen de perfil de terra

consultas

Publicado por terra (62 intervenciones) el 29/08/2013 18:59:42
Vamos por parte y creo que varias personas que colaboramos aquí pensarán de la misma manera.

HTML...


Un formulario está compuesto por dos parte importante:
1
(para iniciar el formaulario)<form></form>(para finalizar el formaulario)
En tu código sólo aparencen DOS
1
</form>
y ningún
1
<form>

TAG: <Select>


está compuesto por este formato:
1
2
3
<select size="1" name="Name">
  <option value="value1">Item1</option>
</select>
En tu código faltan algunos tag's

Detalles, pero contributivos...


En la línea
1
<td><div align>Fecha_Mandamiento</div></td>
Sobran los <DIV> sólo si es para alinear el texto, este TAG's es mucho más potente que sólo para alinear texto.
Reemplaza con...
1
<td aling="left-right-center">Fecha_Mandamiento</td>
con izquierdo o derecho o centrado, lo que quieras.

SUBMIT..


Te recomiendo que los identique para poder manipulear el "Value" mejor luego
1
ej.: <input name="algun_nombre" type="submit" value=">>" />

Ahora bien..
¿tienes algo de código con el que validas esta información recogida en el FORM?
Si la tienes, posteala.
Esperamos...
saludos!!!
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
1
Comentar
sin imagen de perfil

consultas

Publicado por Sergio (9 intervenciones) el 29/08/2013 19:13:44
Como estas Javier, no especificas como haces la consulta a tu base de datos y tampoco a tu tabla de la BD,ni como recoges los datos al momento de concretar la operacion. Agregame https://www.facebook.com/sergio.aguilar.311 y quizas te pueda ayudar remotamente. Si tuvieras el teamviewer mejor para dar el caso x cerrado
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar