Greetings,
I'm new to the list and trying to follow protocol, but my apologies in advance if I slip-up.

I have an app written in fusebox 3, and all is working well enough. I would, however, like to break the part where users register down into smaller fuses.

Scenario - currently, users submit form info which is then checked against a database to make sure the 'team_name' field is unique. If it is not, they are redirected to submit new info, otherwise it is written to a database. At the moment I use an exit fuseaction to redirect to the URL if the form entries fail. I would like to do the same for a successful registration - an exit fuseaction that then uses a query to write their form info to a database and emails the administrator. However, when I try this, cold fusion cannot remember the previous form entries, and thus chokes.

My question: Is there any way to save the form info as a variable to be recalled when that fuseaction is triggered? I am presuming a session variable would be able to capture this data. But admittedly, I don't know how.

All help greatly appreciated
TIA
Mark

Here is my current code, which works fine..
===============================

<cfquery datasource="#request.dsn#" name="teamInfo">
SELECT team_name
FROM client
WHERE team_name = '#form.team_name#'
</cfquery>

<cfif teamInfo.recordcount>
<cflocation URL="">
<cfelse>
<!--- ideally, this is where I would like to insert the fuseaction called #XFA.addRegisterInfo# which then calls the following query as addRegisterinfo.cfm --->
<!--- insert new record --->
<cfquery datasource="#request.dsn#" name="register">

INSERT INTO client (
team_name, username, password, company_name, address_1, address_2, phone, email
)

VALUES (
'#trim(form.team_name)#',
'#trim(form.username)#',
'#trim(form.password)#',
'#trim(form.company_name)#',
'#trim(form.address_1)#',
'#trim(form.address_2)#',
'#trim(form.phone)#',
'#trim(form.email)#'
)
</cfquery>

<cflocation URL="">
</cfif>

Regards
Mark Henderson
Web Designer
      
Clive Wilson Computers Gore Ltd - http://www.cwc.co.nz
ISPNZ Ltd - http://www.ispnz.co.nz
.....................................................
mailto:[EMAIL PROTECTED]
Phone +64 3 208 1988
Fax +64 3 208 1989
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to