[phorm] Re: Preventing double records in MySQL with phorm

  • From: Phorm Support <support@xxxxxxxxx>
  • To: Ton E <phorm@xxxxxxxxxxxxx>
  • Date: Fri, 9 May 2003 07:37:17 -0400

Use the UNIQUE data-validation criterion. If you want the error page
to look the same as your ack page with the exception of displaying the
"duplicate data" message, but still want a different page in the case
of other errors, bear in mind that you can specify different files in
the FILES section, which you then indicate with the error level in
each rule. Check the docs for more detail.

-- 
Alan Little
Phorm Support
http://www.phorm.com/

On Tuesday, May 6, 2003, 8:34:55 PM, you wrote:



> When logging the (phorm) form entries to MySQL normally it is possible that
> the same data can be entered more than once. I would like to prevent this by
> checking the new form entries against what is already in the database. So if
> the sender's email address and the settings are the same more than once the
> new entry should be blocked.

> Blocking would mean in this case these main points:
>>> no entry in the MySQL database (=no use of "INSERT")
>>> no sending of information email message to admin (email.html)
>>> no sending of responder message to the form user (responder.html),
> instead the ack.html should show the user that there was a "double entry and
> his data was not accepted and he should try again".

> Did anyone try to do this already? Or even if you don't know a solution is
> this possible to do with phorm?


> -------------------------------------------------
> You are receiving this message because you are subscribed to the Phorm 
> mailing list. To send messages to the mailing list, simply send email to 
> phorm@xxxxxxxxxxxxx from the address you have
> subscribed. You may unsubscribe from the list by sending email to 
> phorm-request@xxxxxxxxxxxxx with 'unsubscribe' in the SUBJECT field.

-------------------------------------------------
You are receiving this message because you are subscribed to the Phorm mailing 
list. To send messages to the mailing list, simply send email to 
phorm@xxxxxxxxxxxxx from the address you have subscribed. You may unsubscribe 
from the list by sending email to phorm-request@xxxxxxxxxxxxx with 
'unsubscribe' in the SUBJECT field.

Other related posts: