websGetVar | GoAhead WebServer API | GoAhead EMF |
Return the value of a Form variable
#include "webs.h" char_t *websGetVar(webs_t wp, char_t *var, char_t *default);
wp | Web server connection handle |
var | The form variable to be returned |
default | The variable to be returned if none is defined in var |
The websGetVar procedure looks up varin the Form table of variables. If the variable is not defined, the value of the default is returned. If default is NULL and the variable is not found, NULL will be returned. Form variables are created for each <input> form tag. Also defined are the standard form variables.
Returns a pointer to a statically allocated string. Do not call bfree.
name = websGetVar(wp, "Name", "Peter Smith");