ayuda de la función

  • jamesbond
  • Novice
  • Novice
  • No Avatar
  • Registrado: Ago 22, 2011
  • Mensajes: 19
  • Status: Offline

Nota Diciembre 13th, 2011, 12:08 am

He entrada de formulario para un código postal para vincular quiero al usuario agregar su código postal y luego el lonk ir directamente a su mapa del tiempo de U.S. pero al hacer clic en el enlace da $myZip en lugar de la entrada en el cuadro de texto.

mi enlace es una url real para el servicio meteorológico, pero tuve que sacar para poder publicar.

PHP Código: [ Select ]
function addWeatherLink(){
      print '<label>Enter zip<br></label><input type = "text" name = "zip"><br>';//input zip
      $myZip = filter_input(INPUT_POST, "zip");assign zip
      print('<my link =$myZip">Search weather</a>');//add zip to url
   
   }
 
  1. function addWeatherLink(){
  2.       print '<label>Enter zip<br></label><input type = "text" name = "zip"><br>';//input zip
  3.       $myZip = filter_input(INPUT_POST, "zip");assign zip
  4.       print('<my link =$myZip">Search weather</a>');//add zip to url
  5.    
  6.    }
  7.  
  • Anonymous
  • Bot
  • No Avatar
  • Registrado: 25 Feb 2008
  • Mensajes: ?
  • Loc: Ozzuland
  • Status: Online

Nota Diciembre 13th, 2011, 12:08 am

  • spork
  • Brewmaster
  • Silver Member
  • Avatar de Usuario
  • Registrado: Sep 22, 2003
  • Mensajes: 6130
  • Loc: Seattle, WA
  • Status: Offline

Nota Diciembre 13th, 2011, 12:22 pm

Variables sólo se evaluará "comillas dobles", no de comillas.
The Beer Monocle. Classy.

Publicar Información

  • Total de mensajes en este tema: 2 mensajes
  • Usuarios navegando por este Foro: No hay usuarios registrados visitando el Foro y 210 invitados
  • No puede abrir nuevos temas en este Foro
  • No puede responder a temas en este Foro
  • No puede editar sus mensajes en este Foro
  • No puede borrar sus mensajes en este Foro
  • No puede enviar adjuntos en este Foro
 
 

© 2011 Unmelted, LLC. Ozzu® es una marca registrada de Unmelted, LLC