Ver Mensaje Individual
  #2 (permalink)  
Antiguo 17/09/2010, 21:03
Avatar de emprear
emprear
Colaborador
 
Fecha de Ingreso: junio-2007
Ubicación: me mudé
Mensajes: 8.388
Antigüedad: 16 años, 10 meses
Puntos: 1567
Respuesta: Problema al obtener variable que inicie con un número desde PHP

DigInDreams:

Supongo que estará haciendo algo mal en otra parte, porque no hay motivo para que un valor iniciado con un numero no se pase como variable.

haz esta prueba: (ambos ejemplos se inician con un número)

youtube.php

Código PHP:
Ver original
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  3.     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  4. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="es" lang="es">
  5. <head>
  6. <title>Variable con número inicial</title>
  7. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  8. <meta name="description" content="x" />
  9. <meta name="keywords" content="x" />
  10. <meta http-equiv="Content-Language" content="ES-ar" />
  11. <meta name="copyright" content="&copy; 2006, Guillermo Gianello" xml:lang="es" lang="es" />
  12. <meta name="author" content="http://emprear.com"  xml:lang="es" lang="es" />
  13. </head>
  14. <body>
  15. <p>Códigos de ejemplo para pasar</p>
  16. <p>
  17. 1trt3DBnFdg = Baby<br />
  18. 9C4-PZZdsEc = Ronaldo
  19. </p>
  20. <form action="yt.php" method="get">
  21. <div>
  22. <input type="text" name="id" value="" style="background-color: #A3A3A3;" /><br />
  23. <input type="submit" value="enviar" /><br /><br />
  24. </div>
  25. </form>
  26. <?php
  27. $id = $_GET['id'];
  28. ?>
  29. <iframe width="100%" height="500" src="http://www.youtube.com/watch?v=<?php echo $id; ?>">
  30. </iframe>
  31. <!-- ©2000 Emprear.com -->
  32. </body>
  33. </html>

Saludos
__________________
La voz de las antenas va, sustituyendo a Dios.
Cuando finalice la mutación, nueva edad media habrá
S.R.