<?php
error_reporting(E_ALL);
ini_set('display_errors', TRUE);
ini_set('display_startup_errors', TRUE);
include('config.php');
include('functions.php');
$tablePost = $_SESSION["selectedtable"];
$relations ='';
$findRow ='';
$relatedTable = '';
$relatedRow = '';
$getRow = '';
if(isset($relationTable[$tablePost])){
$relations = $relationTable[$tablePost];
//var_dump();
$findRow = $relations['changedRow'];
$relatedTable = $relations['secondTable'];
$relatedRow = $relations['secondRow'];
$getRow = $relations['findRow'];
//super_id,members,memberID,username
//var_dump(getRelatedRow($connect,$relatedRow,$relatedTable,8, 'username'));
// var_dump(getRelatedRow($connect,'members','memberID','8','username'));
}
$subaray = getRelatedRow($connect,$relatedTable,$relatedRow,8,$getRow);
echo $subaray;
|