You can now retrieve all values by using: $values = $_POST['id']; If the name does not end with [], then only a single value will be available via the $_POST variable even if the user checks several checkboxes. trevor 09-Aug-2006 01:49 I needed to do the exact same thing as jwl007 (sort by clicking links) but I needed it to append the variable to the query string if it didn't already exist. Here's the function I'm using: <?php function setGetVar($var, $val){ $request_uri = $_SERVER["REQUEST_URI"]; if(strstr($request_uri, $var)) { return preg_replace("/$var=[\\d\\w]*/", "$var=$val", $request_uri); } elseif(strstr($request_uri, "?")) { return $request_uri . "&" . $var . "=" . $val; } else { return $request_uri . "?" . $var . "=" . $val; } } ?> <a href="<?php echo setGetVar("orderby", "lname"); ?>">Sort by Last Name</a> <a href="<?php echo setGetVar("orderby", "fname"); ?>">Sort by First Name</a> jmurphy at hsdirect dot co dot uk 26-Jul-2006 10:17 As above the $_SERVER['request_uri'] is replaced in windows iis with $_SERVER['script_name'] jameslporter at gmail dot com 06-May-2006 03:19 Refer to CanonicalName if you are not getting the ServerName in the $_SERVER[SERVER_NAME] variable....This was a pain to figure out for me...now it works as expected by turning canonical naming on. http://www.apacheref.com/ref/http_core/UseCanonicalName.html tchamp 26-Apr-2006 10:24 Be careful with HTTP_HOST behind a proxy server. Use these instead. [HTTP_X_FORWARDED_FOR] [HTTP_X_FORWARDED_HOST] [HTTP_X_FORWARDED_SERVER] In my situation, I used [HTTP_X_FORWARDED_SERVER] in place of [HTTP_HOST] in order get the machine and hostname (www.myurl.com) Ben XO 14-Apr-2006 09:18 So you have an application in your web space, with a URL such as this: http://<host>/<installation_path>/ |