Click to See Complete Forum and Search --> : change the post variable position?


davser
06-11-2007, 11:57 AM
By defaut the position of the post string... is given by the declaration of the control.
Example:
<form>
<input name="aa" value="1">
<input name="bb"value="2">
<input name="cc" value="3">
</form>

The post data will be aa=1&bb=2&cc=3. I'm wondering if it is possible without changing the declaration, change the position of the variables like:

aa=1&cc=3&bb=2

Thank you ;)

MrCoder
06-11-2007, 12:02 PM
Why would anybody need to do this?

davser
06-11-2007, 12:16 PM
I give the parameters to a CGI by POST. I want to do a generic CGI, that can treat all posts with certain parameters. Like this...
Address - 1.1.1.1
State - ON/OFF
URL - www....

the CGI is prepared to receive Address&State&URL by this order. But sometimes in code, I need to write the URL first in a input box.

Hope you understand

felgall
06-11-2007, 03:56 PM
$_POST['aa']
$_POST['cc']
$_POST['bb']

MrCoder
06-12-2007, 01:38 AM
I give the parameters to a CGI by POST. I want to do a generic CGI, that can treat all posts with certain parameters. Like this...
Address - 1.1.1.1
State - ON/OFF
URL - www....

the CGI is prepared to receive Address&State&URL by this order. But sometimes in code, I need to write the URL first in a input box.

Hope you understand

No I dont.

andre4s_y
06-12-2007, 03:46 AM
I think that changing the declaration is the simplest way to do..
But if you want to do some effort, you can use different page to rearrange that data [like felgall], after that send the data to your another CGI Script... or you can use java script in the same page.. [i you not alergic with java script] :D
Hope this help you..
regard,
Andre