note 33458 rejected from function.urldecode by rioter

From: Date: Fri, 27 Jun 2003 01:48:37 +0000
Subject: note 33458 rejected from function.urldecode by rioter
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-51066@lists.php.net to get a copy of this message
Note Submitter: ziggyz27@hotmail.com ---- Ok guyz I have good one for you! see if you can figure this one out I have a select box e.g. <form name='test' method=GET target='process.php'> ....// $varfromphpscript = '$id&name=$name&whatever=$what'; while loop begins { ?> <select name="select"> <option value='<?php echo $varfromphpscript; ?>'><?php echo $varnamefromphpscript ?></option> ..... </select> <?php } //while loop ends ?> </form> The while loop assigns values in select menu... Now I am using GET form method to post the form values to another page, the VALUE in select menu is URL strings, e.g. $id&name=$name constructs the URL to what I want i.e. http://www.whatever.com/process.php?select=23&name=ziggy&what=no which when posted gets encoded and changes to something like http://www.whatever.com/process.php?select=23%2name%3Dziggy%2what%3Dno NOW on process.php (the target page) i tried to be smart and used urldecode() to decoded the URL, back to the it should be! like this>> $url = $HTTP_SERVER_VARS["HTTP_HOST"] . $HTTP_SERVER_VARS["REQUEST_URI"]; $url = urldecode($url); Now the question is how do I extract the URL parameters which I use to get easily with $HTTP_GET_VARS[], but now I have the URL in $url, OR how to keep from URL getting encoded in first place? As for why do I have to post all these values via select menu! well all I can say is... I just have to!

« previous php.notes (#51066) next »