Solved thread

This post is marked as solved. If you think the information contained on this thread must be part of the official documentation, please contribute submitting a pull request to its repository.

repeted insertion of data in database

I have userController with addworkAction witch save data in database and redirects to user profile page but if I refresh that page it again inserts data in database. How can I stop inserting data again and again



37.8k
Accepted
answer
edited Mar '14

@sayaliChavan You try Tag::resetInput

if ($post->save() ==true) {
    $this->flash->success("Add Post success");
    Tag::resetInput();
    return $this->dispatcher->forward(array('action' => 'index'));
}

@duythien

it's not working.