function help

  • jamesbond
  • Novice
  • Novice
  • jamesbond
  • Posts: 23

Post 3+ Months Ago

I have input form for a zip code going to link i want the user to add his zip code and then the lonk go directly to his US weather map but when you click on the link it gives $myZip instead of the input from the text box.

my link is a actual url to the weather service but i had to take it out in order to post.

PHP Code: [ 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
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • spork
  • Brewmaster
  • Silver Member
  • User avatar
  • Posts: 6251
  • Loc: Seattle, WA

Post 3+ Months Ago

Variables will only be evaluated in "double quotes", not 'single quotes'.

Post Information

  • Total Posts in this topic: 2 posts
  • Users browsing this forum: No registered users and 79 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
cron
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.