I'm not really following.
The form has a hidden field with the primary key of the poll.  I use
that to determine whether the poll was answered.  Are you suggesting
making a primary key just for the form itself, nothing to do with the
db otherwise?

They should be able to submit multiple times, just not on refresh.

>Are you using a pkey?
>You could generate this pKey on the form page and then on the form
>action page check to see if it exists..
>
><query name="chkDB">
>select * from table where pkey_column = #value#
></query>
><cfif chkDB.recordcount gte 1>
>This record already exists
><cfelse>
>preform insert
></cfif>
>
>so the first time it would insert, everytime after that it wouldn't
>store that value in a session variable and you shouldnt have to
>worry about it..
>however if you wanted them to be able to submit multiple time (new
>forms) then you'd want to clear out that value and get a new one for
>it.
>
>On Wed, 22 Sep 2004 11:00:41 -0400, Daniel Kessler <[EMAIL PROTECTED]> wrote:
>>  I have a form that goes to a page which updates a database.  I check
>>  to see if the form exists and that an answer exists so that the
>>  database will be updated.  Unfortunately, when I refresh the page, it
>>  re-submits the form content.  I tried setting up a no-cache pragma
>>  <META HTTP-EQUIV="Pragma" CONTENT="no-cache">
>>  <META HTTP-EQUIV="Expires" CONTENT="-1">
>>
>>  as well as:
>>  document.forms[0].reset();  which only applies to the form
>>elements, it seems.
>>
>>  Still, when I refresh the page, I resubmit the content.  Anyone know
>  > a cure for this, either through CF or not?
>>

--
Daniel Kessler

Department of Public and Community Health
University of Maryland
Suite 2387 Valley Drive
College Park, MD  20742-2611
301-405-2545 Phone
www.phi.umd.edu
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

Reply via email to