Accessing cfc via form
I am dipping my toe into my first cfc...trying to get more oop oriented.
I have a cfc that I am developing for a login to will check if a user name exists in the db
...so that is one function.
I have a second function that accesses a web service from our Oracle environment that returns a boolean if they customer number is accurate and is on support.All of our customers know their number.
So I created a registration form with a user name field and a customer number field. In my action attribute, I reference my cfc as follows...
action="cfc/login.cfc?method=chkUser"
This seems to work fine for one function. I have two functions as I mentioned, so I thought I could "daisy-chain" the methods...
action="cfc/login.cfc?method=chkUser&method=Oraclechk"
This did not work. Seems that it looks for a method that is chkUser,Oraclechk, which of course, does not exist.
So here are my questions...
- Is there a way to submit multiple methods through the action?
- If not, then I think the best thing would be to combine my functions into one. The only problem is that one function (chkUser) returns a string, which tells the end user that the user name exists [my plan was to perform a cfif within my processing to display that to the end user]. The other function simply returns a status of active or inactive.
Thoughts?
Thanks,
Clay
