logo
Home XtGem- Templates- XtScript- bottom
GET (and POST) html form and query string variables
These can be read by Xtscript using the get and get_or_default commands.
[...] = optional ... = your value
get var_name
get_or_default var_name;default_value

GET POST and Xtscript variables In HTML

This code will be replaced by the value of the GET or POST variable with var_name or the default value
{_$var_name|default value}
This code will be replaced by the value of the Xtscript variable with $var_name or the default value
{_$$var_name|default value}
If you use these codes within xtscript you may not always get what you expect
Show in textarea
<!--parser:xtscript-->
print In Xtscript<br/>
# get a variable
get func
print \$func = $func <br />

# get or use default value
get_or_default a_var;default_value
print \$a_var = $a_var<hr />
<!--/parser:xtscript-->

In html <br />
func = {_$func|}
<br />
$a_var = {_$$a_var|}
Show in textarea
Reload
In Xtscript
$func = get
$a_var = default_value
In html
func = get
$a_var = default_value
Powered by XtGem
About us Contact Forum topÂ