RE: using query_strings in sql

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



<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


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux