Re: Re: Usng Session Vaiable in WHERE Statement

From: Date: Mon, 26 Jul 2004 13:31:30 +0000
Subject: Re: Re: Usng Session Vaiable in WHERE Statement
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-191882@lists.php.net to get a copy of this message
Don't argue with machines, just give it what it wants. Just put the session variable in it's own variable and pass that to the sql statement. $logon = $_SESSION['logname']; $MembersDataQry = "SELECT * FROM MembersData WHERE UserID='$logon'"; --- Daniel Kullik <kullik@wwe.biz> wrote: > Hello again, Michael! > > You ought to read this: > http://de.php.net/manual/en/language.types.string.php#language.types.string.parsing > > > Daniel > > Harlequin wrote: > > Could someone please help me with my syntax > here...? > > > > $MembersDataQry = "SELECT * FROM MembersData > > WHERE UserID='$_SESSION['logname']'"; > > > > I get an error on line 2 but can't seem to figure > out what I've missed. > > > > The variable echoes fine so I know there's a > string in there. > > > > -- > WWE e-commerce IT GmbH > Eiffestrasse 462, D-20537 Hamburg > Tel.: +49-40-2530659-0, Fax: +49-40-2530659-50 > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > __________________________________ Do you Yahoo!? Y! Messenger - Communicate in real time. Download now. http://messenger.yahoo.com

« previous php.general (#191882) next »