PHP - NO PASA TODOS LOS CAMPOS DE FORMULARIO

 
Vista:
Imágen de perfil de Sandra

NO PASA TODOS LOS CAMPOS DE FORMULARIO

Publicado por Sandra (50 intervenciones) el 28/04/2015 10:34:44
Buenas, tengou problema al visualizar los campos de un formulario pasados por url... no me los visualiza todos, a partir de la direccion ya no sale nada... se supone que se pasan todos juntos no? si les pongo un nombre... Os pego el codigo de la pagina del formulario y la que recoje lso datos y, de momento, los visualiza solo para ver que se han pasado bien.

PAGINA FORMULARIO:
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
<?
$id_cliente="";
$id_cliente=$_GET["idcli2"];
//Creamos la conexión a nuestra base de datos
//Hay que sustituir el usuario contraseña
$conexion = mysql_connect("localhost", "s15c4aed_admin", "pass");
 
//Aquí hay que sustituir la el nombre de la base de datos
mysql_select_db("s15c4aed_gestion-acr", $conexion);
$sql="select * from CLIENTE where ID_CLIENTE ='$id_cliente'";
$rs=mysql_db_query("s15c4aed_gestion-acr",$sql);
 
$razsoc="";
$cifnif="";
$tel1="";
$tel2="";
$direc_fisc="";
$num_fisc="";
$piso_fisc="";
$puerta_fisc="";
$esc_fisc="";
$cp_fisc="";
$munic_fisc="";
$prov_fisc="";
$email1="";
$email2="";
 
 
 
echo "<form name='modificar' method='POST' action='http://gestion-acrasesores.s15c4aed.alojamientovirtual.com/modules/modificareg/modifica.php?id_cliente=$_GET[idcli2]' target='nventana' onsubmit='procesar(this.action);'>";
 
 
while ($row=mysql_fetch_array($rs))
{
echo "<TABLE BORDER=0 align=center><caption><h1><font color='blue'>Modificar datos</FONT></H1></CAPTION>
     <tr>
     <th ALIGN=RIGHT>Cliente nº: </th><td>".$row['ID_CLIENTE']."</td>
     </tr><tr>
     <th ALIGN=RIGHT>Razón Social: </th><td>".$row['RAZON_SOCIAL']."</td>
     </tr><tr>
     <td ALIGN=RIGHT><font color='blue'>Nuevo Dato: </font></td><td><input type='text' name='razonsocial' size='40'></td>
     </tr><tr>
     <th ALIGN=RIGHT>CIF/NIF: </th><td>".$row['CIFNIF']."</td>
     </tr><tr><td ALIGN=RIGHT><font color='blue'>Nuevo Dato: </font></td><td><input type=text name= 'cifnif' maxlength='15' size='15'></td>
     </tr><tr>
     <th ALIGN=RIGHT>Teléfono l: </th><td>".$row['TEL1']."</td></tr><tr>
     <td ALIGN=RIGHT><font color='blue'>Nuevo Dato: </font></td><td><input type=text name='tel1'  maxlength='9' size='9'></td>
     </tr><tr>
    <th ALIGN=RIGHT>Teléfono 2: </th><td>".$row['TEL2']."</td></tr><tr>
    <td ALIGN=RIGHT><font color='blue'>Nuevo Dato: </font></td><td><input type=text maxlength='9' name='tel2' size='9'></td>
    </tr><tr>
    <th ALIGN=RIGHT>Dirección: </th><td>".$row['DIRECCION_fiscal']." Num: ".$row['NUMERO_fiscal']." Piso: ".$row['PISO_fiscal']." Pta: "
    .$row['PUERTA_fiscal']." Esc: ".$row['ESCALERA_fiscal']."</td></tr><tr>
    <td ALIGN=RIGHT><font color='blue'>Nuevos Datos: </font></td><td><input type=text name='direcfisc' maxlength='40' size='40'></tr><tr>
     <td>            </td><td>Num: <input type=text name='numfisc' maxlength='3' size='3'>
     Piso: <input type=text maxlength='2' name='pisofisc' size='2'>
     Pta: <input type=text maxlength='1' name='puertafisc' size='1'>
     Esc: <input type=text maxlength='2' name='escfisc' size='2'>
     </td></tr><tr>
     <th ALIGN=RIGHT>Codigo Postal: </th><td>".$row['COD_POST_fiscal']."</td></tr><tr>
     <td ALIGN=RIGHT><font color='blue'>Nuevo Dato: </font></td><td><input type=text name='cpfisc' maxlength='6' size='6'>
     </td></tr><tr>
     <th ALIGN=RIGHT>Municipio: </th><td>".$row['MUNICIPIO_fiscal']."</td></tr><tr>
     <td ALIGN=RIGHT><font color='blue'>Nuevo Dato: </font></td><td><input type=text maxlength='15' name='municfisc' size='15'>
     </td></tr><tr>
     <th ALIGN=RIGHT>Provincia: </th><td><b>".$row['PROVINCIA_fiscal']."</b></td></tr><tr>
     <td ALIGN=RIGHT><font color='blue'>Nuevo Dato: </font></td><td> <select NAME='provincia'>
<option>Álava
<option>Albacete
<option>Alicante
<option>Almería
<option>Asturias
<option>Ávila
<option>Badajoz
<option>Baleares
<option>Barcelona
<option>Burgos
<option>Cáceres
<option>Cádiz
<option>Cantabria
<option>Castellón
<option>Ceuta
<option>Ciudad Real
<option>Córdoba
<option>Cuenca
<option>Girona
<option>Granada
<option>Guadalajara
<option>Guipúzcoa
<option>Huelva
<option>Huesca
<option>Jaén
<option>La Coruña
<option>La Rioja
<option>Las Palmas
<option>León
<option>Lérida
<option>Lugo
<option>Madrid
<option>Málaga
<option>Melilla
<option>Murcia
<option>Navarra
<option>Orense
<option>Palencia
<option>Pontevedra
<option>Salamanca
<option>Santa Cruz de Tenerife
<option>Segovia
<option>Sevilla
<option>Soria
<option>Tarragona
<option>Teruel
<option>Toledo
<option>Valencia
<option>Valladolid
<option>Vizcaya
<option>Zamora
<option>Entrada lateral
<option SELECTED>Elija Provincia
</select>
     </td></tr><tr>
     <th ALIGN=RIGHT>Email 1: </th><td>".$row['EMAIL1']."</td></tr><tr>
     <td ALIGN=RIGHT><font color='blue'>Nuevo Dato: </font></td>
     <td><input type=text name='email1' maxlength='35' size='35'></td></tr><tr>
     <th ALIGN=RIGHT>Email 2: </th><td>".$row['EMAIL2']."</td></tr><tr>
      <td ALIGN=RIGHT><font color='blue'>Nuevo Dato: </font></td>
     <td><input type=text name='email2' maxlength='35' size='35'></td></tr>
</TABLE>
<center><input type='submit' value='Modificar cliente'> <input type='reset' value='Borrar Datos'></center>
</form>";

PAGINA QUE VISUALIZA

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
<?
$razsoc2=$_POST["razonsocial"];
$cifnif2=$_POST["cifnif"];
$tel1=$_POST["tel1"];
$tel2=$_POST["tel2"];
$direc_fisc2=$_POST["direcfisc"];
$num_fisc2=$_POST["num_fisc"];
$piso_fisc2=$_POST["pisofisc"];
$puerta_fisc2=$_POST["puertafisc"];
$esc_fisc2=$_POST["escfisc"];
$cp_fisc2=$_POST["cpfisc"];
$munic_fisc2=$_POST["municfisc"];
$prov_fisc2=$_POST["provfisc"];
$email1_2=$_POST["email1"];
$email2_2=$_POST["email2"];
$idcli2=$_GET["id_cliente"];
echo $razsoc2;
echo "<br>";
echo $cifnif2;
echo "<br>";
echo $idcli2;
echo "<br>";
echo $tel1;
echo "<br>";
echo $tel2;
echo "<br>";
echo htmlspecialchars($_POST['$direcfisc']);
echo "<br>";
echo $num_fisc;
echo "<br>";
echo $piso_fisc;
echo "<br>";
echo $puerta_fisc;
echo "<br>";
echo $esc_fisc;
echo "<br>";
echo $munic_fisc;
echo "<br>";
echo $prov_fisc;

Y se ve asi:

imagen

Alguna idea??

Gracias!
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

NO PASA TODOS LOS CAMPOS DE FORMULARIO

Publicado por xve (6935 intervenciones) el 28/04/2015 15:04:58
Hola Sandra, fíjate que en la pagina que visualiza tienes puesto un "2" al final de las variables...

1
$num_fisc2=$_POST["num_fisc"];
y en el "echo" haces:
1
echo $num_fisc;
cuando tendría que ser:
1
echo $num_fisc2;

Es este el problema?
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 Sandra

NO PASA TODOS LOS CAMPOS DE FORMULARIO

Publicado por Sandra (50 intervenciones) el 28/04/2015 15:20:16
estoy tonta o q m pasa!! era esoooo joliiiinnn jajajajajaja menudo despiste todo el santo dia de ayer y hoy con esto... dsd luego tengo tela! y la mayoria de lo q no m funciona es por despistes como este! gracias gracias! jajajaj ahora a ver si me modifica la base de datos o tengo que volver a preguntar por aqui (que será lo más seguro jaja)

Grasias grasias!!!!
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