14.4.1 Accessing Forms - Continued | |
The previous page's script first searches our table mytbl for results from our site, and prints them. Then it uses <submit> to search www.search-o-rama.com 's archive and append those results to the user.
We set METHOD=post because we happen to know their site can't handle query strings. The rest of the form's variables are simply passed as assignment arguments to <submit> . They will be automatically URL-encoded into the proper format for submission.
We don't want to wait too long for search-o-rama to return, so we set a timeout of 10 seconds (before the submit).
When the <submit> returns, we simply send the result HTML to our user. We use <send> so that the HTML tags are not escaped, just as the original site would show.
The <urlcp nbsp;reparentmode nbsp;abs> ensures that all links and images in the raw HTML returned by <submit> will be automatically made absolute (ie. include the host name). This ensures our user doesn't see any broken links from search-o-rama that were really relative: they would look like relative links to our site which don't exist.
Back: Accessing Forms | Next: Parsing Search Results |