Win a copy of Transfer Learning for Natural Language Processing (MEAP) this week in the Artificial Intelligence and Machine Learning forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Paul Clapham
  • Devaka Cooray
  • Bear Bibeault
Sheriffs:
  • Junilu Lacar
  • Knute Snortum
  • Liutauras Vilda
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Piet Souris
Bartenders:
  • salvin francis
  • Carey Brown
  • Frits Walraven

PHP - How to set variables without having user input with a form

 
Ranch Hand
Posts: 83
Android Python Chrome
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So I am studying how the Google search engine works and how it preforms queries to gain a better understanding of how to collect data and sort through that data.  Now, I am messing around with some forms to figure out how the actual system takes in the values. When I look at the actual page code(the code generated by the php) I only see, in the search form, that there is a text field and a submit button. Now i know to set a text field's name to "q" but how to I set it up so that it can go to google images and not just google web search. I am trying to use the following format.

what would I add so that it would go to goog;le images instead
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello, Rocky.

By the default, the server could not guess where the search should be triggered only passing the parameter "q". If I understand your scenario, you want to create a search where the user can input some words and then redirect the users to image's section. Try setting the "tbm" parameter to "isch" like below:

 
"I know this defies the law of gravity... but I never studied law." -B. Bunny Defiant tiny ad:
Two software engineers solve most of the world's problems in one K&R sized book
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic