RE: [PHP-DB] using query_strings in sql

From: Date: Wed, 21 Jan 2004 21:05:50 +0000
Subject: RE: [PHP-DB] using query_strings in sql
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-32565@lists.php.net to get a copy of this message
brother that was it!!!! at least as far as putting a query_string variable into a sql statement. thx!!!! I'll have to see how it works regarding if-else clauses -gil > -----Original Message----- > From: Matt Matijevich [mailto:matijevich@alliancetechnologies.net] > Sent: Wednesday, January 21, 2004 3:53 PM > To: php-db@lists.php.net; mayo@nycinteractive.com > Subject: RE: [PHP-DB] using query_strings in sql > > > <snip> > WHAT DOESN'T HAPPEN is that the query_string values DO NOT trump the > default > variables. > > so query_string = ?class=X&section=Y&order=ASC > > I can't input these variables : $class,$section,$order into the SQL > statement > > SELECT * > FROM classes > WHERE section=$section > ORDER BY $class $order > </snip> > > I am getting in really late in this disussion so I apologize if I am > off base here but if you have register_globals off > > $section, $class, and $order wont get set. > > try this: > $section = $_GET['section']; > $class = $_GET['class']; > $order = $_GET['order']; > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

« previous php.db (#32565) next »