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>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking
application. Start tracking and documenting hours spent on a project or with a
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:212722
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=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54