Shouldn't you be using $_GET or, since register_globals are set to off,
$order_by should contain "FIRSTNAME"

Gary Every
Sr. UNIX Administrator
Ingram Entertainment
(615) 287-4876
"Pay It Forward"
mailto:[EMAIL PROTECTED]
http://accessingram.com


-----Original Message-----
From: Jerry [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 05, 2003 3:40 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Column Sort Question


Hi All,

This is a newbie question. I am using PHP Version 4.2.3 with
register_globals=off. I am trying to creating a simple address book with
mysql as the backend. I have a  form that passes what the user wants to
query from the address book and it returns everything in a table with column
heading just fine. I use $myvar1=$_POST['myvar1']; to pass the info from the
form to the php file.

I am using the following in the header fields of the table:
<th nowrap> <a href="<?php echo "$PHP_SELF?order_by=FIRSTNAME"; ?>">First
Name</a> </th>

This doesn't work (I get a bunch of errors) and I think it's because the
variable from $_POST are not staying persistent. I tried playing around with
session with no luck.

What is the best way to resort on a column?

Thanks,

Jerry



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to