03-30-2017, 02:25 PM
So here are the steps I would take.
I would start simple.
1. I would include the instead of just the db class. There are other things you may need beyond just the db class. The most obvious thing is that you're using Input::get which is part of the input class which you haven't included.
Start there and see if that works.
2. If it doesn't, I would do something really simple just to make sure you're able to get SOMETHING into the DB. Without including the init, it probably doesn't even know the $user->data()-id, which is probably part of your problem, so once you've included the init, try doing
And make sure you're getting that into the db. If you need help beyond that, let me know.
I would start simple.
1. I would include the
Code:
users/init.php
Start there and see if that works.
2. If it doesn't, I would do something really simple just to make sure you're able to get SOMETHING into the DB. Without including the init, it probably doesn't even know the $user->data()-id, which is probably part of your problem, so once you've included the init, try doing
Code:
if ($updatestatus != 1) {
Code:
$db->insert('letters',['author'=>$user->data()->id]);
Code:
}
And make sure you're getting that into the db. If you need help beyond that, let me know.