/    Sign up×
Community /Pin to ProfileBookmark

change the post variable position?

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 ?

to post a comment
PHP

5 Comments(s)

Copy linkTweet thisAlerts:
@MrCoderJun 11.2007 — Why would anybody need to do this?
Copy linkTweet thisAlerts:
@davserauthorJun 11.2007 — 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
Copy linkTweet thisAlerts:
@felgallJun 11.2007 — $_POST['aa']

$_
POST['cc']

$_POST['bb']
Copy linkTweet thisAlerts:
@MrCoderJun 12.2007 — 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[/QUOTE]


No I dont.
Copy linkTweet thisAlerts:
@andre4s_yJun 12.2007 — 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] ?

Hope this help you..

regard,

Andre
×

Success!

Help @davser spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.1,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,
)...