Results 1 to 2 of 2
March 31st, 2003, 01:30 AM #1
- Join Date
- January 18th, 2005
Can you make an ssi statement sort of dynamic if you pass search terms frorm a query to it via an embeded variable in the statement? Does that make sense to anyone?
April 4th, 2003, 11:49 PM #2
You would have to use something like PHP as the handler for the submitted form and have the SSI inside the PHP file. And you would want the form to use METHOD=POST rather than METHOD=GET so that no parameters appear.
For example, a form handler in PHP called search.php would do something like the following pseudo-code:
1. get submitted form data in $parm1, $parm2, ...
2. concatenate data into one string "$parm1&$parm2&..." in $parms
If you want to use a particular results template, you could either add &template=... to the URL in step 3 or add a hidden <INPUT NAME="template" VALUE="..."> to the form itself.
NOTE: A disadvantage of forms that use METHOD=POST is that the handler of such forms cannot be bookmarked properly since those URL's do not contain any of the submitted data. For example, bookmarking search.php and returning to it later will not show the expected page since the search parameters were not saved as part of the URL.
per: David Cusimano
By Cursal in forum Building Traffic, Newsletters & AdvertisingReplies: 3Last Post: January 6th, 2004, 01:11 PM
By Doug247 in forum Programming / Datafeeds / ToolsReplies: 1Last Post: December 8th, 2003, 08:35 PM
By badkitty in forum Programming / Datafeeds / ToolsReplies: 16Last Post: February 7th, 2002, 04:39 PM