Having a Problem getting a Global Variable
Posted: 2023-09-22 10:26
Hi
I have 2 problems at the moment
Firstly I have a database controlling wine storage where I would like the clients to log into the database and see the following
1) No of pallets sorted by the winetype and vintage
2) no of pallets sorted by the destination
3) No of pallets sorted by the category (type of Storage 'L/D' lying down bottles, 'S/U' standing up bottles '3H' 3 Pallets high )
I created in _globals.php the following
function login_ok($memberInfo, &$args) {
$logFile = 'members.log';
$usrindex = $memberInfo['custom'][0]; */= (custindex) */
$usrname = $memberInfo['custom'][1]; */= (custname) */
$ip = $memberInfo['IP'];
$date = date('m/d/Y');
$time = date('h:i:s a');
file_put_contents($logFile, "$date, $time,$usrindex,$usrname \n", FILE_APPEND);
return ' ' ;
}
so how do I get in the SQL "WHERE custindex = '$usrindex' "?
With the login the client show only get to see his pallets/
thanks for your help
David
I have 2 problems at the moment
Firstly I have a database controlling wine storage where I would like the clients to log into the database and see the following
1) No of pallets sorted by the winetype and vintage
2) no of pallets sorted by the destination
3) No of pallets sorted by the category (type of Storage 'L/D' lying down bottles, 'S/U' standing up bottles '3H' 3 Pallets high )
I created in _globals.php the following
function login_ok($memberInfo, &$args) {
$logFile = 'members.log';
$usrindex = $memberInfo['custom'][0]; */= (custindex) */
$usrname = $memberInfo['custom'][1]; */= (custname) */
$ip = $memberInfo['IP'];
$date = date('m/d/Y');
$time = date('h:i:s a');
file_put_contents($logFile, "$date, $time,$usrindex,$usrname \n", FILE_APPEND);
return ' ' ;
}
so how do I get in the SQL "WHERE custindex = '$usrindex' "?
With the login the client show only get to see his pallets/
thanks for your help
David