Preventing data redundancy

By: Michael Boadi Nkansah | Asked: 07/31/2023
ForumsCategory: Code HelpPreventing data redundancy
Michael Boadi Nkansah asked 9 months ago
How do i prevent users from using the same receipt number to apply for a different service.
Victor Font replied 9 months ago

You need to explain your process in detail. What's a receipt #? How does a user obtain one? How are you storing it? Is it the same form or a different form? Are users logged in or are they creating entries anonymously? Details please?

Michael Boadi Nkansah replied 9 months ago

ok. this is what am trying to do. i have website that allows people to register for a service. in order for them to register for the service they have to pay and then obtain a receipt that they can in turn use the receipt number to request for the service.
now what i want to achieve is that after they have used the receipt number to apply for a service, it cannot be reused for another service. am using different forms for each service but the process it somewhat the same. how do i prevent the reuse of the of the receipt

1 Answers
Victor Font answered 9 months ago
There are a few ways you can do this. Here are 2. You can make the second form's receipt field unique, or you can create custom code to set an "already used" flag.

Making the Best WordPress Plugin even better - Together

Take on bigger projects with confidence knowing you have access to an entire community of Formidable Experts and Professionals who have your back when the going gets tough. You got this!
Join the community
crossarrow-right