/    Sign up×
Community /Pin to ProfileBookmark

form POST and GET question

could someone tell, what do i use if i want a variable to be invisble on the URL bar…

because…i use post, and the variables are shown on top…

to post a comment
PHP

9 Comments(s)

Copy linkTweet thisAlerts:
@bathurst_guyDec 22.2006 — GET uses the address bar,

POST passes them 'invisably'
Copy linkTweet thisAlerts:
@TyreeDec 22.2006 — I thought that was the case, but he said he was using post. Isn't there a setting for php that will put the vars in the url for post too? I was researching it a bit, but I can't find it. Just sounds familiar to me.
Copy linkTweet thisAlerts:
@so_is_thisDec 22.2006 — could someone tell, what do i use if i want a variable to be invisble on the URL bar...

because...i use post, and the variables are shown on top...[/QUOTE]

Using POST means that the form data is sent invisibly. However, if you include a query string in the form's [B]action[/B] attribute, that will still show in the browser's address bar.
Copy linkTweet thisAlerts:
@NightShift58Dec 22.2006 — Nothing is really "invisible"...

But as previously mentioned by others, information sent by way of POST will not be visible in the URL whereas any GET data will be visible.

Still anyone can see you data, whether POST or GET, by simply looking at your page's source code and not just by seeing the URL.

One major difference is that data sent by POST will not be stored in the browser's history, whereas GET data will be kept in the history along with the rest of the URL.
Copy linkTweet thisAlerts:
@so_is_thisDec 22.2006 — Nothing is really "invisible"... [/QUOTE]
Duh! This is the second time (within 24 hours) you've read more into a thread than what the OP says and asked. The rest of us are speaking in the context of the OP's question:
could someone tell, what do i use if i want a variable to be [B][COLOR=Blue]invisble on the URL bar[/COLOR][/B]... [/QUOTE]
(emphasis added) Thus, you should be able to see that "invisible" is in relation to the address bar -- nothing else. :rolleyes:
Copy linkTweet thisAlerts:
@NightShift58Dec 22.2006 — And, perhaps, you read too little into it... and into mine. My comments address his question, simply adding to what others have written - a common practice in forums worldwide.

What you understand as invisible may not be what the OP meant - or maybe it did. You pointed out differences between POST and GET and I added one additional difference which you either didn't know or forgot to mention.

Where's the harm in giving the OP a bit more - relevant - information? Or do we need to rename this thread: "Re-emergence of the Taleban"?
Copy linkTweet thisAlerts:
@phpshift2Dec 22.2006 — Nothing is really "invisible"...

But as previously mentioned by others, information sent by way of POST will not be visible in the URL whereas any GET data will be visible.

Still anyone can see you data, whether POST or GET, by simply looking at your page's source code and not just by seeing the URL.

One major difference is that data sent by POST will not be stored in the browser's history, whereas GET data will be kept in the history along with the rest of the URL.[/QUOTE]


Well, you're wrong anyway. The variables are not stored in the page's source code. PHP disappears completely(besides browser output) from the browser after parsing. In what way can you view the variables through the source?
Copy linkTweet thisAlerts:
@NightShift58Dec 22.2006 — In any <form>, if you look at the HTML source, any so-called "hidden input" ([B]<input type='hidden'...[/B]) will be visible. The same applies to any data passed by way of GET in [B]<form action='xxx'>[/B]. The remaining data in a form would be the one that the user types in.

The whole process is fairly transparent. One of the differences between GET and POST, as I mentioned, is that any data sent via POST is "forgotten" by the browser, i.e. it doesn't get stored in the browser's history.
Copy linkTweet thisAlerts:
@sb_Dec 22.2006 — In summary read the php.net website before asking easily answered and documented questions. Stop being lazy.
×

Success!

Help @php_hazard_01 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 5.18,
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: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

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

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...