[Typo3] Using GET variables, need opinions/help.

Fr. Simon Rundell SCP simon at rundell.org.uk
Tue Mar 1 16:17:20 CET 2005

..er isn't what Bernard describes a POST value, not a GET?

Personally, I try and avoid GETs as much as possible

a) because there is always a danger that valuable/key information may get
displayed on the URL line. I don't really want my password displayed (and
therefore passed) on an unecrypted url string.
b) There is a suspicion that lots of data in the GET line may be an
obfursticated url and lead to a dodgy site
c) it makes the url look messy, and obviates the point of using
simulate_static or real_url
d) urls with lots of get info in them don't make very nice bookmarks, and
are rarely reproducable

I prefer POSTS because

a) key state information can be passed in hidden form fields
b) the url is clean
c) if you book mark the page and the key state information is not there, you
can trap and redirect to the beginning of a process ie a login
d) one function: t3lib_div::GPVars[<varName>]


Fr. Simon

-----Original Message-----
From: typo3-english-bounces at lists.netfielders.de
[mailto:typo3-english-bounces at lists.netfielders.de] On Behalf Of Kraft
Sent: 01 March 2005 09:04
To: typo3-english at lists.netfielders.de
Subject: Re: [Typo3] Using GET variables, need opinions/help.

Joshua Preston wrote:
> If I am making an extension and need to use GET variables, is
> $variablename = t3lib_div::_GET('variablename');
> the correct way of doing it or is there another preferred method?

The method I prefer is:

$content .= '<input type="text name="'.$this->prefixId.'[email]"
value="Enter your email here">';

I can then access the value in my FE Plugin with:
$email = $this->piVars['email'];

Kraft Bernhard
MOKKA Medienagentur <http://www.mokka.at>
T: +43 - 1 - 895 33 33 - 50
Typo3-english mailing list
Typo3-english at lists.netfielders.de

More information about the TYPO3-english mailing list