Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CGI.SCRIPT_NAME

Status
Not open for further replies.

BunBo900

MIS
Dec 11, 2009
50
0
0
US
Hi,

I am trying to fix an existing code. I am not sure what "#CGI.SCRIPT_NAME#" there for. If someone could give me an explanation that would be great. Thanks.

<cfform name="frmDrug" action="#CGI.SCRIPT_NAME#" method="post">
 
CGI.SCRIPT_NAME returns the path of the current page. With self-posting forms like yours, CGI.SCRIPT_NAME is used so you do not have to hard-code the action page value. The advantage is the form will still work if you ever happen to change the name of your .cfm page.

If you are curious, dump the CGI scope to see all of the variables avaiable.

<cfdump var="#CGI#" />

----------------------------------
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top