-
Notifications
You must be signed in to change notification settings - Fork 10
chl_get
it4e edited this page Apr 16, 2016
·
1 revision
<chl/chl.h>
chl_get, CHL GET
char * chl_get(char * name);
The chl_get function is used to fetch the value of the GET method variable [name].
- name: the name of the GET variable
On success: GET variable value, 0 if GET variable is not defined.
Call CHL controller file 'index.chl' with GET parameters (name=Olof, id=10)
index.chl?name=Olof&id=10
main.c
#include <chl/chl.h>
#include <stdio.h>
int main() {
chl_set_default_headers();
chl_print_headers();
printf("%s has id %s.", chl_get("name"), chl_get("id"));
}
Output: Olof has id 10.