Is this right???
[code=php] mysql_select_db($_SESSION[‘db’]); $result = mysql_query(“SELECT * FROM $_SESSION[‘table’]”); [/code]
I’m guessing, NO!
If i put the variable names in directly, everything works fine. I’m guessing I’m missing something – fresh eyes would help.
[code=php]$result = mysql_query("SELECT * FROM {$_SESSION['table']}");[/code]
[code=php]$result = mysql_query("SELECT * FROM " . $_SESSION['table']);[/code]
Help @rch10007 spread the word by sharing this article on Twitter...