Buy Now
Sign in

1062 - Duplicate entry '28' for key 'PRIMARY'

dgrimes , January 21 2016
D
dgrimes
I used chronoforms to create a table based off a form I created. It submits the first time fine, but any submission after that won't enter because it is trying to enter the same primary ID. of "28".

The form is grabbing the article ID from the URL.

How can I prevent this from happening?
GreyHead
Hi dgrimes,

Please see this FAQ

Bob
ChronoForms technical support
If you'd like to buy me a coffee or two, thank you very much
D
dgrimes
More too this issue.. It is not a bug.

I am redirecting users and using the following php code.

header ("Location: index.php?option=com_content&view=article&id=28&referral_code=" . $referral);

Because I am using the URL like this the form is treating "id=28" as a variable for the form.

Any advise on how to redirect users to an Article and pass POST data?
D
dgrimes
Bob, you are fantastic!

unsetting the variable did the trick. I sent you a couple of pounds for your trouble.

Thanks again for getting back to me so quickly.