Results 1 to 2 of 2
  1. #1
    Join Date
    January 17th, 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?

  2. #2
    ABW Ambassador cusimano's Avatar
    Join Date
    January 18th, 2005
    Toronto, Canada
    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
    3. virtual("/cgi-bin/$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.

    Yours truly,
    Cusimano.Com Corporation
    per: David Cusimano

  3. Newsletter Signup

+ Reply to Thread

Similar Threads

  1. Adsense and ssi
    By Cursal in forum Building Traffic, Newsletters & Advertising
    Replies: 3
    Last Post: January 6th, 2004, 12:11 PM
  2. Need help With SSI
    By Doug247 in forum Programming / Datafeeds / Tools
    Replies: 1
    Last Post: December 8th, 2003, 07:35 PM
  3. SSI Questions
    By badkitty in forum Programming / Datafeeds / Tools
    Replies: 16
    Last Post: February 7th, 2002, 03:39 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts