ph_getwebparm PowerHome formula function
Description
Returns the value associated with the specified web parm
Syntax
ph_getwebparm ( as_id )
ph_getwebparm ( as_id, as_parms )
Argument | Description |
as_id | String. The web parm you wish to receive. When using PSP (PowerHome Server Pages) to serve dynamic content from PowerHome via the web, you can create forms and pass information from a web page back to PowerHome via either an HTML GET or POST command. This data is then stored within PowerHome and accessible within a PSP page via this function |
as_parms | String (Optional). A full list of parameters and their
values from which you would like to search for as_id and return its value.
If this parameter is omitted, it will use the web parameters that are
currently within memory for the active webpage that is being processed. |
Return value
String. The data associated with the specified web parm.
Usage
Use this function to retrieve a value
associated with a specific web parameter. Typically you would call this
function from within a PSP page to get the results of a previously submitted
form value and structure the new web page output accordingly. In this use case
scenario, you would use the syntax that does not include the as_parms parameter.
The syntax that includes the as_parms parameter is for more general usage and
allows the user to specify the full parameter list from which to retrieve the
value instead of using the parameters loaded in memory from within an executing
PSP page
Examples
The following examples demonstrate typical syntax/usage for this function.
• ph_getwebparm("familyroom_lightlevel") - Returns the
value associated with the web parameter FAMILYROOM_LIGHTLEVEL assuming that this
value is a member of the current web parameters that have been passed to the
active
webpage