|
|
|
|
![]() ![]() |
![]() ![]() ![]() ![]() Group: Members
Posts: 58 Joined: 31-January 06 Member No.: 17,937 |
Post
#1
Feb 10 2006, 09:30 PM
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
| Topic Title | Replies | Topic Starter | Views | Last Action | |||
|---|---|---|---|---|---|---|---|
![]() |
9 | peroim | 1,184 | 5th November 2006 - 11:23 PM Last post by: bajanca |
|||
![]() |
3 | Albus Dumbledore | 800 | 30th June 2006 - 05:07 PM Last post by: serverph |
|||
![]() |
3 | MacFly | 3,000 | 17th November 2004 - 06:24 AM Last post by: Spectre |
|||
![]() |
3 | shyam | 2,618 | 22nd November 2004 - 03:45 AM Last post by: dropout21 |
|||
![]() |
8 | renegade-designs | 5,466 | 28th September 2009 - 11:48 AM Last post by: iG-Jess |
|||
![]() |
17 | burgen | 5,108 | 26th January 2005 - 08:08 PM Last post by: burgen |
|||
![]() |
10 | thablkpanda | 4,245 | 27th February 2005 - 10:17 PM Last post by: alexia |
|||
![]() |
2 | shadow skazi | 3,144 | 1st March 2005 - 04:16 PM Last post by: maddog39 |
|||
![]() |
0 | OpaQue | 925 | 16th March 2005 - 06:57 PM Last post by: OpaQue |
|||
![]() |
8 | nykegodess | 6,871 | 1st November 2009 - 12:02 AM Last post by: Ash-Bash |
|||
![]() |
5 | Misanthrope | 138 | 25th August 2009 - 10:18 PM Last post by: Misanthrope |
|||
![]() |
2 | kvarnerexpress | 1,769 | 9th April 2005 - 04:17 AM Last post by: dexter |
|||
![]() |
12 | -jkylee- | 2,660 | 1st February 2005 - 07:34 PM Last post by: -SweetLou- |
|||
![]() |
4 | leiaah | 1,695 | 18th April 2005 - 01:01 AM Last post by: leiaah |
|||
![]() |
4 | beeseven | 3,040 | 18th April 2005 - 12:38 AM Last post by: snlildude87 |
|||
|
Open Discussion | Time is now: 6th November 2009 - 06:54 AM |
Web Hosting Powered by ComputingHost.com.