# Nested add forms of multiple tables via form buttons

**URL:** <https://discourse.cakephp.org/t/nested-add-forms-of-multiple-tables-via-form-buttons/7806>\
**Category:** Need Help\
**Created:** [May 11, 2020, 3:48pm UTC](https://discourse.cakephp.org/t/nested-add-forms-of-multiple-tables-via-form-buttons/7806 "2020-05-11T15:48:03Z")\
**Posts on this page:** 1\
**Showing post:** 12

<div class="post-metadata">

**Author:** ![Zuluru](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.cakephp.org/zuluru/32/1230_2.png) [@Zuluru](https://discourse.cakephp.org/u/Zuluru)\
**Post date:** [May 15, 2020, 3:15pm UTC](https://discourse.cakephp.org/t/nested-add-forms-of-multiple-tables-via-form-buttons/7806/12 "2020-05-15T15:15:09Z")

</div>

You may have correctly used the word redirection, and are now misusing “routing”. 🙂 Routing is basically what figures out which controller action to call for a particular URL; redirection is the act of sending the visitor to a new URL after completing some process.

Redirecting to `index` is normal after `add`, but you haven’t shown any code that includes a `redirect` call. And this may explain your other “bug”: if you’re calling `debug` and then `redirect`, then the output from the `debug` call will be lost forever. Debug output is not like `flash` text, which persists in the session between page loads.

---

_[View the full topic](https://discourse.cakephp.org/t/nested-add-forms-of-multiple-tables-via-form-buttons/7806)._
