Hi folks,
I'm trying to make an update query with a session variable...
It creates this error:
Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting
T_STRING or T_VARIABLE or T_NUM_STRING in ...
Q: the session var shows ok on the page :
ID ?php echo $_SESSION['now_poid'];
On Mon, Feb 23, 2009 at 12:34:58PM -0800, revDAVE wrote:
Hi folks,
I'm trying to make an update query with a session variable...
It creates this error:
Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting
T_STRING or T_VARIABLE or T_NUM_STRING in ...
Q: the
On February 23, 2009 15:34:58 revDAVE wrote:
Hi folks,
//but this does not..
$updateSQL =UPDATE `mytable` SET thetotal=$amt WHERE
id=$_SESSION['thisid'];
Q: How can I fix it?
try :
$updateSQL =UPDATE `mytable` SET thetotal=$amt WHERE
id={$_SESSION['thisid']};
or even better:
On 2/23/2009 12:44 PM, Paul M Foster pa...@quillandmouse.com wrote:
Don't single quote values inside array brackets when the whole
expression is in double quotes. You've got:
... $_SESSION['thisid'];
Do this instead:
... $_SESSION[thisid];
AHA - thanks much - that worked!
--
Paul M Foster wrote:
On Mon, Feb 23, 2009 at 12:34:58PM -0800, revDAVE wrote:
Hi folks,
I'm trying to make an update query with a session variable...
It creates this error:
Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting
T_STRING or T_VARIABLE or
5 matches
Mail list logo