wondering why this won't work, the only bits that's not working is the commented out bit, i'm wondering just how it managed to wrong all of a sudden.
PHP Code:
if ($_POST['do'] == 'dogroups')
{
globalize($_POST, array('grpsaction'));
foreach ($grpsaction AS $groupid => $action)
{
if ($action == 0)
{ // no point in checking the permission if they dont want to do anything to the group
continue;
}
$confessionid = intval($confessionid);
if ($action == 1)
{ // validate
$DB_site->query("
UPDATE " . TABLE_PREFIX . "grps
SET approved = 1
WHERE groupid = $groupid
");
//create grps_post row
//don't need to do this, it's done on the fly.
/*
//create grps_user row
//select data from db
$adduser = $DB_site->query("
SELECT *
FROM " . TABLE_PREFIX . "grps
WHERE groupid = $groupid
LIMIT 1
");
//intravenous
$DB_site->query("
INSERT INTO " . TABLE_PREFIX . "grps_user(groupid,userid,join_date)
VALUES ($adduser[groupid],$adduser[leaderid]," . NOW . ")
");
*/ }
basically i'm trying to add data into the second table based on the $groupid
however the $adduser array seems to be empty.