[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date
][Minivend by thread
]
Re: SET Variable
****** message to minivend-users from Marius Schaefer <webmaster@bpaserver.net> ******
Hi Larry,
Larry Leszczynski wrote:
> Hello Marius -
>
> > I wanna create a new variable using
> >
> > [set new_var]
> > [value VAR]
> > [/set]
>
> There are two types of variables, scratch variables and session variables.
>
> You can set a scratch variable like so:
> [set VAR]100[/set]
> and access in a page with
> [scratch VAR]
>
> You can also do it with Perl:
> [perl scratch] $Safe{'scratch'}{'VAR'} = 100; ''; [/perl]
> ^^^
> the return value of the
> perl routine is displayed
> on the page, so use this
> to make it return blank
This works ([value VAR] = 100):
[perl arg=scratch interpolate=1]
$Safe{'scratch'}{'new_var'} = '[value VAR]';
[/perl]
Then I can access
[scratch new_var]
with the return of "100".
> Likewise for session variables:
> [perl values] $Safe{'values'}{'VAR'} = 100; ''; [/perl]
> and access in a page with
> [value VAR]
>
> Make sure you do
> [set mv_put_session]Yes[/set]
> someplace so that variables you set will stick around from page to page.
>
> Larry Leszczynski
> larryl@furph.com
> --
> furph, Inc. WWW/Unix/Windows Solutions 734-513-7763 (voice)
> info@furph.com http://www.furph.com 734-513-7759 (FAX)
--
Mit freundlichen Grüßen
Marius Schäfer
schaefer@bpaserver.net
black point arts
soft- & webservice
http://www.bpaserver.net
eschersheimer landstr. 471
60431 frankfurt
tel. 069-952-181-50
fax. 069-952-181-41
-
To unsubscribe from the list, DO NOT REPLY to this message. Instead, send
email with 'UNSUBSCRIBE minivend-users' in the body to Majordomo@minivend.com.
Archive of past messages: http://www.minivend.com/minivend/minivend-list