Ver Mensaje Individual
  #6 (permalink)  
Antiguo 30/06/2011, 07:25
Avatar de Patriarka
Patriarka
 
Fecha de Ingreso: enero-2011
Ubicación: Moreno, Buenos Aires, Argentina
Mensajes: 2.851
Antigüedad: 13 años, 3 meses
Puntos: 288
Respuesta: Error al Pasar Variables por URL

a Lmaster:

Código HTML:
Ver original
  1. <TITLE>origen.html</TITLE>
  2. </HEAD>
  3. <?php
  4. $var1 = "Hola";
  5. $var2 = "Comoandas?";
  6. ?>
  7. <a href="destino1.php?productID=<?php echo $var1; ?>">Paso variables saludo y texto a la página destino.php</a><br>
  8.  
  9. </BODY>
  10. </HTML>

***************************************

destino.php

Código HTML:
Ver original
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  4. <title>Untitled Document</title>
  5. </head>
  6. <?php
  7.  
  8. echo (isset($_GET["productID"]) ? $_GET["productID"] : 'id vacio';
  9. ?>
  10.  
  11. </body>
  12. </html>
¨*************************************************