Hi Dave

What I have is a questionnaire that I would like users (internal) to
only submit once.  If they have already submitted feedback and try to
access the page again they see the STOP! wording. If they have yet to
successfully submit a form then they view the page as normal.  The form
is question also uses perl for the processing.


So basically you are saying if I check for a form.fieldname that I know
will have a value I can use that to set the Client Variable

i.e.

 <cfif isDefined("form.EXAMPLEFORMFIELD")> 

   <cfset client.localip = #cgi.remote_addr#>

</cfif>

<cfif isDefined("client.localip") and client.localip EQ
#cgi.remote_addr# >
  STOP!
  <cfabort>
</cfif> 

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: 25 July 2005 14:24
To: CF-Talk
Subject: RE: Restricting Access

I'd look for 'form.fieldnames' like isDefined("form.fieldnames").
That's how I check for form submissions.  I hope this is what you're
looking for as I wasn't sure what you're asking.  If you are trying to
maintain this only during the current session, you shouldn't need to
worry about it because IP address won't change during the session.  It
sounds like you're trying to persist across session's however, so why
not just set a cookie on the person's machine that says they've
submitted the feedback form already (maybe that's what you're trying to
do with the client.localip).  

In any case, what if a different user uses that computer.  You don't
want them to be able to submit a feedback question also?  If your
concern is that you don't want the same person to submit a feedback
form, then I would tie it to their user account, not their IP address. 

I hope that helps.  I'm a bit confused myself. :-)

Dave

-----Original Message-----
From: Ian Vaughan [mailto:[EMAIL PROTECTED]
Sent: Monday, July 25, 2005 9:08 AM
To: CF-Talk
Subject: Restricting Access


I have the following code that supposed to check by their IP address if
a user has submitted a feedback form, if they have and try to visit the
page again they get STOP! If they have not submitted a form before they
see the form.

However how can I set the first line <cfif isDefined etc..  To set the
client.localip variable when the user has submitted the form ????

 <cfif isDefined("form.submit???????????")> 

   <cfset client.localip = #cgi.remote_addr#>

</cfif>

<cfif isDefined("client.localip") and client.localip EQ
#cgi.remote_addr# >
  STOP!
  <cfabort>
</cfif>








~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Find out how CFTicket can increase your company's customer support 
efficiency by 100%
http://www.houseoffusion.com/banners/view.cfm?bannerid=49

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:212723
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to