Re: HTTP_*_VARS access

From: Date: Thu, 28 Jun 2001 14:31:45 +0000
Subject: Re: HTTP_*_VARS access
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-1035@lists.php.net to get a copy of this message
Hi, Andrei Zmievski wrote: > > Could you implement a $request.something that contains both get and post > > vars? Most of the time I don't care whether my template was called by a > > post or a get. > What do you suggest? I think GET and POST variables should be accessed > separately.. Well, suppose I have a template based site, where each page is rendered based on some variable I put in the url, for example: www.mysite.com/index.php?page=help In the template, I use the {$page} variable to display the correct content. Now, on my site, I have a form. One of the hidden fields of that form is <input type="hidden" name="page" value="success">. (just an example, you can do other things with it) In my main.tpl file (opened by index.php), I don't want to have to do this: {if $smarty.request.get.page!=""} // use get.page to display {else} // use post.page to display {/if} Just using $smarty.request.urlvars.page (or whatever name fits best) would be nice. Greetings, Ivo -- Ivo Jansch <ivo@ibuildings.nl> ibuildings.nl BV - information technology http://www.ibuildings.nl

« previous php.smarty.general (#1035) next »