I need some hep with spaghetti code and request sc...
# cfml-general
f
I need some hep with spaghetti code and request scope. I have an app that needs to search courses in the current semester. Sounds easy enough, but this is just the heginning of the page: <!---<cfsilent> ---> <cfset request.usewaitlist=1> <cfset request.valid_prog = false> <cfset request.showdates = 0> <cfif NOT (IsDefined("url.time") AND REFind("^(fall|spring|summer)\_\d\d\d\d$",url.time))> <cflocation url = "index.cfm" addtoken="no"> </cfif> <cfparam name="url.first_year" default="0"> <cfif IsDefined("url.skill")> <cfset where_text = " AND ((other LIKE 'SKL%') OR (other LIKE '%,SKL%')) "> <cfelseif url.first_year EQ 1> <cfset where_text = " AND ((other LIKE 'FY%') OR (other LIKE '%,FY%')) "> <cfelse> <cfset where_text = " AND ((other IS NULL) OR ((other NOT LIKE 'FY%') AND (other NOT LIKE '%,FY%'))) "> </cfif>
m
So URL scope is set usually in the link which sends you to the page. So for example it might be: <a href="findcourses.cfm?time=fall_2022">FIND COURSES</a>
f
👍