Home > Products > Authorware > Support > Tracking and Recording Performance
Macromedia Authorware Support Center - Tracking and Recording Performance
Using PostURL to transfer data

Use the PostURL function to transfer the data to the server. Add the following statements to a calculation icon to send the collected data to the server:

-- this example uses Cold Fusion as the middleware
URL_string := ""
command_string := "username=" ^ Username^"&"^ Return^ "password=" ¬
^password^"&"^ Return^ "score=" ^score^"&"^ Return
result := PostURL( URL_string , command_string )
-- WriteExtFile("C:\\Windows\\Desktop\\result.htm", result)

In the first statement, URL_string contains the location of the file used by the middleware to communicate with the database. The InsertAction.CFM is a text file containing statements executed by the Cold Fusion application on the server.

URL_string := ""

In the second statement, command_string contains the data in the format expected by the middleware and database:

command_string := "username=" ^ Username^"&"^ Return^ "password=" ¬^password^"&"^ Return^ "score=" ^score^"&"^ Return

In the second statement, PostURL sends the contents of command_string to the location specified in URL_string :

result := PostURL( URL_string , command_string )

Remove the comment ( -- ) from the last line to save the result of the call to PostURL in a local text file. Doing so is useful for testing or troubleshooting the database connection:

WriteExtFile("C:\\Windows\\Desktop\\result.htm", result)

To Table of Contents Back to Previous document Forward to next document