loftusp Posted May 11, 2011 Share Posted May 11, 2011 I have created a basic website which allows users to login and then need to record their location. I have it so they enter their location into a form, but I need to associate the table for users with locations. I used the code: $user = R::findOne('person', 'username=?', array($_SESSION['name'])); $plc = R::dispense('location'); $plc->location = $_REQUEST['location']; $plc->activity = $_REQUEST['activity']; $id = R::store($plc); R::associate($user, $plc ); It returns the error: Catchable fatal error: Argument 1 passed to R::associate() must be an instance of RedBean_OODBBean, boolean given HELP???!!!! :confused: :shrug: Quote Link to comment https://forums.phpfreaks.com/topic/236105-rassociate-with-redbean-and-php/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.