Re: HTTP_*_VARS access

From: Date: Thu, 28 Jun 2001 14:53:50 +0000
Subject: Re: HTTP_*_VARS access
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-1036@lists.php.net to get a copy of this message
On Thu, 28 Jun 2001, Ivo Jansch wrote: > 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. If you (or anyone else on this list) can come up with a good name for that, I can merge POST and GET vars into it (but still have them available separately as well). -Andrei * "Syntactic sugar causes cancer of the semicolon." -- Alan Perlis *

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