Sorry I'm really not good at this. Basically my table is called locations into which a user adds their location and activity. This is then linked to a user in a person_location table. This is the delete code I have created. Not sure how good it is.
case 'delete' :
$id = isset($_REQUEST['id']) ? $_REQUEST['id'] : '';
if (!$id) {
echo 'No Location identified!';
} else
{
$currentLocation = R::findOne('location', 'id=?', array($id));
$pps = R::findOne('person', 'name=?', array($_SESSION['name']));
// Why is this not deleting it from the database???
R::unassociate($_SESSION['name'], $currentLocation);
R::trash($currentLocation);
}
$tpl = 'loggedin.twig';
break;
Using that detail what would the . $row['id'] . be??