|
|
|
|
![]() ![]() |
Feb 10 2006, 09:30 PM
Post
#1
|
|
|
Member [Level 1] ![]() ![]() ![]() ![]() Group: Members Posts: 58 Joined: 31-January 06 Member No.: 17,937 |
i did a php function to format url, i will pass some $_GET variable to it and it will eliminate them from the url, and here's the code:
CODE <? $PS = $_SERVER['PHP_SELF']; $QS = $_SERVER['QUERY_STRING']; // *** remove undesired parameters from url *** // function formaturl($remove_me1,$remove_me2,$remove_me3) { global $PS, $QS, $PS_new; //$GET if (!strpos($PS, "?") && !empty($QS)) { $QS_new = "?"; reset($_GET); while (list($key,$value) = each($_GET)) { if ($key != $remove_me1 && $key != $remove_me2 && $key != $remove_me3) { if(strlen($QS_new) > 1) $QS_new .= "&"; $QS_new .= $key . "=" . $value; } } if (strlen($QS_new) > 1) $PS_new = $PS.$QS_new; } return $PS_new; } // ***************************************** // ?> any help would be appticated |
|
|
|
![]() ![]() |
Similar Topics
| Topics | Topics | |
|---|---|---|
|
|
|
|
Lo-Fi Version | Time is now: 24th July 2008 - 06:49 AM |