Searching the web...unix

Hello,
I am writing a command that uses a search-motor in a website...
my code is :

lynx -dump "http://www.theweathernetwork.com/index.php?product=search&pagecontent=results&prodtype=city&prodname=$1"|grep $1|head -1000>>temp.txt

so if the user types myprogram.sh nameofTheCity:
it should go to the website :
"The Weather Network - Weather forecasts, maps, news and videos"

as you can see I put the nameofTheCity equals to $1 in my code but it still does not work ...how can I fix this issue?
I was thinking of using tr command to translate nameofTheCity to the user input.can you tell me how I can do it?