nervegas87
07-02-2007, 01:19 AM
My php code consists of getting a person's session_id() and placing that in a session variable for use in other pages.
The thing is, though, that when i place a session variable in a mysql query, i get the following error:
Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/content/e/r/i/ericjacobson01/html/index.php on line 11
This is the part that php complains about:
$_SESSION['buyer_id'] = session_id();
$istableset = mysql_query("SELECT * FROM ' .$_SESSION['buyer_id'] '");
The thing is, though, that when i place a session variable in a mysql query, i get the following error:
Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/content/e/r/i/ericjacobson01/html/index.php on line 11
This is the part that php complains about:
$_SESSION['buyer_id'] = session_id();
$istableset = mysql_query("SELECT * FROM ' .$_SESSION['buyer_id'] '");