# After add in page event issue

**URL:** <https://forum.radsystems.io/t/after-add-in-page-event-issue/347>\
**Category:** PHPRad Classic\
**Created:** [June 22, 2021, 10:08am UTC](https://forum.radsystems.io/t/after-add-in-page-event-issue/347 "2021-06-22T10:08:51Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![TERzo](https://forum.radsystems.io/letter_avatar_proxy/v4/letter/t/9de053/32.png) [@TERzo](https://forum.radsystems.io/u/TERzo)\
**Post date:** [June 22, 2021, 10:08am UTC](https://forum.radsystems.io/t/after-add-in-page-event-issue/347/1 "2021-06-22T10:08:52Z")

</div>

hi, I insert the following code in the events page to change the status ( another table ) of the “status” field: `DB :: table ('cart') -> where ('id', 4) -> update (['status' =>' prova ']) ;`.  
If I insert it in before add the status is changed regularly, if I insert it in after add I get the following error: ErrorException  
`Undefined variable: record`

 ![rad](https://forum.radsystems.io/uploads/default/original/1X/94695122301ddb501143890cf9a0b4576bafcac2.jpeg)
