cmd
1
hey there,
i have a variable in php called $_SESSION[‘memberinfo’]. it is an array.
anyone know the syntax so i don’t have to store an array value into a temporary variable? for example instead of:
$username = $_SESSION[‘memberinfo’][4];
$query =
“SELECT * FROM members where username=’$username’”;
use this instead:
$query =
“SELECT * FROM members where username=’$_SESSION[memberinfo][4]’”;
chris
system
2
$query = “SELECT * FROM members where username=’” . $_SESSION[memberinfo][4] . “’”;
system
3
Don’t use backticks - that’d be equivalent to this:
$_SESSION[shell_exec("memberinfo")][4]
which I assume you don’t want to do 
system
4
thanks it works, i gotta use . notation for all queries now
chris