|
Mailing Lists
|
Home /
Groups /
ColdFusion Talk (CF-Talk)
capture a search string
Hello,Orlini, Robert 03/11/10 10:51 A That sounds like an application specific question.Bobby Hartsfield 03/11/10 10:59 A I do exactly what Bobby suggested:Eric Nicholas Sweeney 03/11/10 11:16 A Thanks. Working good.Orlini, Robert 03/11/10 02:20 P Hello, Is there some CF coding that I can employ that will capture a search string when users type a search and later on provide it in a report. At minimum we should capture the dateTime, userIP, search string and number of search results. The data will be stored in an SQL table. Thanks. RO HWW That sounds like an application specific question. The search string is most likely submitted via form field so you can grab that from the form scope obviously. The ip address can be grabbed from cgi.remote_addr The date/time can come from #now()# The result count comes from your queries recordcount result. Then you just stick it all in a table. Hello, Is there some CF coding that I can employ that will capture a search string when users type a search and later on provide it in a report. At minimum we should capture the dateTime, userIP, search string and number of search results. The data will be stored in an SQL table. Thanks. RO HWW I do exactly what Bobby suggested: On the "search results page" I save the user info (IP, if logged in, etc), date-time stamp and whatever was in the "form field(s)" to a table in the DB. However - I do not save the results - just what was searched for. - Nick Thanks. Working good. RO That sounds like an application specific question. The search string is most likely submitted via form field so you can grab that from the form scope obviously. The ip address can be grabbed from cgi.remote_addr The date/time can come from #now()# The result count comes from your queries recordcount result. Then you just stick it all in a table. Hello, Is there some CF coding that I can employ that will capture a search string when users type a search and later on provide it in a report. At minimum we should capture the dateTime, userIP, search string and number of search results. The data will be stored in an SQL table. Thanks. RO HWW
|
July 31, 2010
|
Latest Fusion Authority Articles
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||