Problem with MySQLi query recognizing a session variable
Here is my query. The query always returns 0 results. However, if I output the session variable on the page, it works just fine.
<?php session_start(); ?>
<?php require_once('../Connections/numeroseti.php'); ?>
<?php require_once('../webassist/mysqli/rsobj.php'); ?>
<?php
$getAdminUser = new WA_MySQLi_RS("getAdminUser",$numeroseti,1);
$getAdminUser->setQuery("SELECT * FROM adminuser WHERE userid = ?");
$getAdminUser->bindParam("i", "".(isset($_SESSION['$_SESSION['adminuserid']'])?$_SESSION['$_SESSION['adminuserid']']:"") ."", "-1"); //colname
$getAdminUser->execute();
?>
This always gives me 0: <?php echo $getAdminUser->TotalRows ?>
This outputs the session variable (assigned from the login page) just fine: <?php echo $_SESSION['adminuserid']; ?>
I'm just not seeing what I am doing wrong.
Thanks.