<pre>-- The beginnings of a Web-based search engin for HyperCard-based CGI programs.-- User submits search criteria ; the handler builds a valid logical expression.-- This expression is meant for the commands "find" and "mark cds where".function searchCriteria post  ---  set the itemDelimiter to "="  ---  put postDataItem("Date1",post) into date1  put postDataItem("Date2",post) into date2  put "isWithinDateRange(fld" && quote & "DateCreation" & quote & ")" && "AND " into criteria  ---  repeat with x = 4 to the number of lines of post    put item 2 of line x of post into fieldValue    ---    if fieldValue is not empty then      put item 1 of line x of post into fieldName      put quote & fieldValue & quote && "is in fld" && quote & fieldName & quote && "AND " after criteria    end if    ---  end repeat  delete last word of criteria  return criteria  ---end searchCriteria</pre>