Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+1 vote
in Q2A Core by
I wrote some function in if(qa_clicked('button')) so that if I click button it will insert a record to db. But I found that if I clicked once and kept refreshing the page, it would keep doing things in the IF CLAUE (inserting). Am I writing the wrong code or is there a way to avoid that?
Q2A version: 1.6.3
Hi, Did you find any solution to this problem?

1 Answer

0 votes

At the end of the processing of the button click just redirect the page to self . 

you could do something like this - 



This sould fix your issues .