Newsgrupos.com  

Retroceder   Newsgrupos.com > Forum > Newsgroup es.comp.lenguajes.* Foro > Newsgroup es.comp.lenguajes.php
Registrarse Preguntas Frecuentes Lista de Foreros Calendario Buscar Temas de Hoy Marcar Foros Como Leídos




Respuesta
 
LinkBack Herramientas Desplegado
  #1 (permalink)  
Antiguo 07-01-2007, 19:43:01
vhdani@gmail.com
 
Mensajes: n/a
Predeterminado Variable

Hola a todos, os agradecería que me echarais una mano.

Estoy empezando con PHP un tengo una duda, tengo una página en el que
se muestran los registro de una tabla, tengo otra página que borra el
registro que seleccionemos, pero el problema que tengo es que no se
enviar la variable del registro a borrar. Os dejo el enlace a la
página

http://rtyrty.100webspace.net/buscar_clientes.php

y este el código fuente.



$result = mysql_query("SELECT cli_cod, cli_tit, cli_cif, cli_tvi,
cli_nvi,

cli_pob, cli_nt1, cli_nt2, cli_nfa FROM 001cli WHERE cli_tit LIKE
'%$T1%'",

$link);




if ($row = mysql_fetch_array($result)){
echo "<table border = '0'> \n";
echo "<tr><td>Codigo</td><td>Cliente</td><td>N.I.F.</td><td>

</td><td>Dirección</td><td>Población</td><td>Teléfono
1</td><td>Teléfono

2</td><td>Fax</td><td>Borrar</td></tr> \n";

echo "<tr><td> <BR> </td></tr> \n";

do {
echo "<tr><td>".$row["cli_cod"]."</td><td>".$row

["cli_tit"]."</td><td>".$row["cli_cif"]."</td><td>".$row

["cli_tvi"]."</td><td>".$row["cli_nvi"]."</td><td>".$row

["cli_pob"]."</td><td>".$row["cli_nt1"]."</td><td>".$row

["cli_nt2"]."</td><td>".$row["cli_nfa"]."</td>
<td><a
href=\"borrar_registro.php?cli_cod='$cli_cod'\">Bo rra</a></td></tr>
\n"; /// AQUI ESTA LA CLAVE
PERO NO SE COMO, EL CAMPOS QUE QUIERO GUARDAR COMO VARIABLE ES CLI_COD



} while ($row = mysql_fetch_array($result));
echo "</table> \n";
} else {
echo "¡ No se ha encontrado ningún registro !";
}
?>




MUCHAS GRACIAS A TODOS

Responder Con Cita
Alt Today
Advertising
Google Adsense
 
This advertising will not be shown
in this way to registered members.
Register your free account today
and become a member on
Newsgrupos.com
Standard Sponsored Links

  #2 (permalink)  
Antiguo 07-01-2007, 22:00:22
Iván Sánchez Ortega
 
Mensajes: n/a
Predeterminado Re: Variable

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

vhdani***gmail.com wrote:

> $result = mysql_query("SELECT cli_cod, cli_tit, cli_cif, cli_tvi,
> cli_nvi,
> cli_pob, cli_nt1, cli_nt2, cli_nfa FROM 001cli WHERE cli_tit LIKE
> '%$T1%'",


Estás usando mysql_rea_escape_string sobre $T1 antes de meterlo en la query,
¿¿verdad??

> <td><a
> href=\"borrar_registro.php?cli_cod='$cli_cod'\">Bo rra</a></td></tr>
> \n"; /// AQUI ESTA LA CLAVE
> PERO NO SE COMO, EL CAMPOS QUE QUIERO GUARDAR COMO VARIABLE ES CLI_COD


En borrar_registro.php, eso inicializará un elemento del array superglobal
$_GET : $_GET['cli_cod'] .


- --
- ----------------------------------
Iván Sánchez Ortega -ivansanchez-algarroba-escomposlinux-punto-org-

Now listening to: Portishead - Welcome to Portishead0 - [9] Sour Times (live
in France) (6:40) (96%)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFFoW15R56dWuhgxGgRAlDAAJ46TAIlwOH08cuEpxmCb3 Sgdx+B7wCeL++P
5XYBJa2AeHjlMaVZeEpkwwY=
=VWrE
-----END PGP SIGNATURE-----
Responder Con Cita
  #3 (permalink)  
Antiguo 07-01-2007, 22:00:22
Iván Sánchez Ortega
 
Mensajes: n/a
Predeterminado Re: Variable

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

vhdani***gmail.com wrote:

> $result = mysql_query("SELECT cli_cod, cli_tit, cli_cif, cli_tvi,
> cli_nvi,
> cli_pob, cli_nt1, cli_nt2, cli_nfa FROM 001cli WHERE cli_tit LIKE
> '%$T1%'",


Estás usando mysql_rea_escape_string sobre $T1 antes de meterlo en la query,
¿¿verdad??

> <td><a
> href=\"borrar_registro.php?cli_cod='$cli_cod'\">Bo rra</a></td></tr>
> \n"; /// AQUI ESTA LA CLAVE
> PERO NO SE COMO, EL CAMPOS QUE QUIERO GUARDAR COMO VARIABLE ES CLI_COD


En borrar_registro.php, eso inicializará un elemento del array superglobal
$_GET : $_GET['cli_cod'] .


- --
- ----------------------------------
Iván Sánchez Ortega -ivansanchez-algarroba-escomposlinux-punto-org-

Now listening to: Portishead - Welcome to Portishead0 - [9] Sour Times (live
in France) (6:40) (96%)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFFoW15R56dWuhgxGgRAlDAAJ46TAIlwOH08cuEpxmCb3 Sgdx+B7wCeL++P
5XYBJa2AeHjlMaVZeEpkwwY=
=VWrE
-----END PGP SIGNATURE-----
Responder Con Cita
  #4 (permalink)  
Antiguo 07-01-2007, 22:00:22
Iván Sánchez Ortega
 
Mensajes: n/a
Predeterminado Re: Variable

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

vhdani***gmail.com wrote:

> $result = mysql_query("SELECT cli_cod, cli_tit, cli_cif, cli_tvi,
> cli_nvi,
> cli_pob, cli_nt1, cli_nt2, cli_nfa FROM 001cli WHERE cli_tit LIKE
> '%$T1%'",


Estás usando mysql_rea_escape_string sobre $T1 antes de meterlo en la query,
¿¿verdad??

> <td><a
> href=\"borrar_registro.php?cli_cod='$cli_cod'\">Bo rra</a></td></tr>
> \n"; /// AQUI ESTA LA CLAVE
> PERO NO SE COMO, EL CAMPOS QUE QUIERO GUARDAR COMO VARIABLE ES CLI_COD


En borrar_registro.php, eso inicializará un elemento del array superglobal
$_GET : $_GET['cli_cod'] .


- --
- ----------------------------------
Iván Sánchez Ortega -ivansanchez-algarroba-escomposlinux-punto-org-

Now listening to: Portishead - Welcome to Portishead0 - [9] Sour Times (live
in France) (6:40) (96%)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFFoW15R56dWuhgxGgRAlDAAJ46TAIlwOH08cuEpxmCb3 Sgdx+B7wCeL++P
5XYBJa2AeHjlMaVZeEpkwwY=
=VWrE
-----END PGP SIGNATURE-----
Responder Con Cita
  #5 (permalink)  
Antiguo 07-01-2007, 22:00:22
Iván Sánchez Ortega
 
Mensajes: n/a
Predeterminado Re: Variable

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

vhdani***gmail.com wrote:

> $result = mysql_query("SELECT cli_cod, cli_tit, cli_cif, cli_tvi,
> cli_nvi,
> cli_pob, cli_nt1, cli_nt2, cli_nfa FROM 001cli WHERE cli_tit LIKE
> '%$T1%'",


Estás usando mysql_rea_escape_string sobre $T1 antes de meterlo en la query,
¿¿verdad??

> <td><a
> href=\"borrar_registro.php?cli_cod='$cli_cod'\">Bo rra</a></td></tr>
> \n"; /// AQUI ESTA LA CLAVE
> PERO NO SE COMO, EL CAMPOS QUE QUIERO GUARDAR COMO VARIABLE ES CLI_COD


En borrar_registro.php, eso inicializará un elemento del array superglobal
$_GET : $_GET['cli_cod'] .


- --
- ----------------------------------
Iván Sánchez Ortega -ivansanchez-algarroba-escomposlinux-punto-org-

Now listening to: Portishead - Welcome to Portishead0 - [9] Sour Times (live
in France) (6:40) (96%)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFFoW15R56dWuhgxGgRAlDAAJ46TAIlwOH08cuEpxmCb3 Sgdx+B7wCeL++P
5XYBJa2AeHjlMaVZeEpkwwY=
=VWrE
-----END PGP SIGNATURE-----
Responder Con Cita
  #6 (permalink)  
Antiguo 07-01-2007, 22:00:22
Iván Sánchez Ortega
 
Mensajes: n/a
Predeterminado Re: Variable

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

vhdani***gmail.com wrote:

> $result = mysql_query("SELECT cli_cod, cli_tit, cli_cif, cli_tvi,
> cli_nvi,
> cli_pob, cli_nt1, cli_nt2, cli_nfa FROM 001cli WHERE cli_tit LIKE
> '%$T1%'",


Estás usando mysql_rea_escape_string sobre $T1 antes de meterlo en la query,
¿¿verdad??

> <td><a
> href=\"borrar_registro.php?cli_cod='$cli_cod'\">Bo rra</a></td></tr>
> \n"; /// AQUI ESTA LA CLAVE
> PERO NO SE COMO, EL CAMPOS QUE QUIERO GUARDAR COMO VARIABLE ES CLI_COD


En borrar_registro.php, eso inicializará un elemento del array superglobal
$_GET : $_GET['cli_cod'] .


- --
- ----------------------------------
Iván Sánchez Ortega -ivansanchez-algarroba-escomposlinux-punto-org-

Now listening to: Portishead - Welcome to Portishead0 - [9] Sour Times (live
in France) (6:40) (96%)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFFoW15R56dWuhgxGgRAlDAAJ46TAIlwOH08cuEpxmCb3 Sgdx+B7wCeL++P
5XYBJa2AeHjlMaVZeEpkwwY=
=VWrE
-----END PGP SIGNATURE-----
Responder Con Cita
  #7 (permalink)  
Antiguo 07-01-2007, 22:00:22
Iván Sánchez Ortega
 
Mensajes: n/a
Predeterminado Re: Variable

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

vhdani***gmail.com wrote:

> $result = mysql_query("SELECT cli_cod, cli_tit, cli_cif, cli_tvi,
> cli_nvi,
> cli_pob, cli_nt1, cli_nt2, cli_nfa FROM 001cli WHERE cli_tit LIKE
> '%$T1%'",


Estás usando mysql_rea_escape_string sobre $T1 antes de meterlo en la query,
¿¿verdad??

> <td><a
> href=\"borrar_registro.php?cli_cod='$cli_cod'\">Bo rra</a></td></tr>
> \n"; /// AQUI ESTA LA CLAVE
> PERO NO SE COMO, EL CAMPOS QUE QUIERO GUARDAR COMO VARIABLE ES CLI_COD


En borrar_registro.php, eso inicializará un elemento del array superglobal
$_GET : $_GET['cli_cod'] .


- --
- ----------------------------------
Iván Sánchez Ortega -ivansanchez-algarroba-escomposlinux-punto-org-

Now listening to: Portishead - Welcome to Portishead0 - [9] Sour Times (live
in France) (6:40) (96%)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFFoW15R56dWuhgxGgRAlDAAJ46TAIlwOH08cuEpxmCb3 Sgdx+B7wCeL++P
5XYBJa2AeHjlMaVZeEpkwwY=
=VWrE
-----END PGP SIGNATURE-----
Responder Con Cita
  #8 (permalink)  
Antiguo 08-01-2007, 11:53:08
vhdani@gmail.com
 
Mensajes: n/a
Predeterminado Re: Variable


> > href=\"borrar_registro.php?cli_cod='$cli_cod'\">Bo rra</a></td></tr>
> > \n"; /// AQUI ESTA LA CLAVE
> > PERO NO SE COMO, EL CAMPOS QUE QUIERO GUARDAR COMO VARIABLE ES CLI_COD

>
> En borrar_registro.php, eso inicializará un elemento del array superglobal
> $_GET : $_GET['cli_cod'] .
>


Perdona mi falta de conocimientos pero no se donde colocar
$_GET['cli_cod']


Gracias por la ayuda

Responder Con Cita
  #9 (permalink)  
Antiguo 08-01-2007, 11:53:08
vhdani@gmail.com
 
Mensajes: n/a
Predeterminado Re: Variable


> > href=\"borrar_registro.php?cli_cod='$cli_cod'\">Bo rra</a></td></tr>
> > \n"; /// AQUI ESTA LA CLAVE
> > PERO NO SE COMO, EL CAMPOS QUE QUIERO GUARDAR COMO VARIABLE ES CLI_COD

>
> En borrar_registro.php, eso inicializará un elemento del array superglobal
> $_GET : $_GET['cli_cod'] .
>


Perdona mi falta de conocimientos pero no se donde colocar
$_GET['cli_cod']


Gracias por la ayuda

Responder Con Cita
 
  #10 (permalink)  
Antiguo 08-01-2007, 11:53:08
vhdani@gmail.com
 
Mensajes: n/a
Predeterminado Re: Variable


> > href=\"borrar_registro.php?cli_cod='$cli_cod'\">Bo rra</a></td></tr>
> > \n"; /// AQUI ESTA LA CLAVE
> > PERO NO SE COMO, EL CAMPOS QUE QUIERO GUARDAR COMO VARIABLE ES CLI_COD

>
> En borrar_registro.php, eso inicializará un elemento del array superglobal
> $_GET : $_GET['cli_cod'] .
>


Perdona mi falta de conocimientos pero no se donde colocar
$_GET['cli_cod']


Gracias por la ayuda

Responder Con Cita
Respuesta


Herramientas
Desplegado

Normas de Publicación
no Puedes crear nuevos temas
no Puedes responder a temas
no Puedes adjuntar archivos
no Puedes editar tus mensajes

El código vB está habilitado
Las caritas están habilitado
Código [IMG] está habilitado
Código HTML está deshabilitado
Trackbacks are habilitado
Pingbacks are habilitado
Refbacks are habilitado


Temas Similares
Tema Autor Foro Respuestas Último mensaje
WHERE Variable Ricardo Garcia Newsgroup microsoft.public.es.vfoxpro 1 05-03-2008 18:51:04
Asignar SQL a una variable Marcelo Newsgroup microsoft.public.es.access 5 20-01-2008 22:12:01
problema con este error Error 91: Object variable or With block variable not set Jose Avilez Newsgroup microsoft.public.es.vb 1 10-12-2007 21:44:30
¿limitador variable? Francisco Mercader Newsgroup es.rec.bricolaje 112 10-11-2007 15:08:46
variable session carlos m. Newsgroup microsoft.public.es.vinterdev 7 28-02-2004 04:52:30





Powered by: vBulletin, Versión 3.6.8
Derechos de Autor ©2000 - 2008, Jelsoft Enterprises Ltd.

LinkBacks Enabled by vBSEO 3.1.0 © 2007, Crawlability, Inc.