cgiGetValue(3)
π cgiGetValue β bestie, let's get that value π
okay so this one lives in the cgiGetValue(3) page of the programmer's manual, and it's literally the little function that goes and grabs a CGI variable's value for you. no cap, it's a whole vibe. πΈ
β¨ NAME β¨
cgiGetValue β return the value of a CGI variable π
β¨ SYNOPSYS β¨
#include <cgi.h>
char *cgiGetValue (s_cgi *parms, const char *name);
(it's giving "short and iconic", we love to see it π )
β¨ DESCRIPTION β¨
so this routine hands you back a pointer to the value of a cgi variable. π«Ά and listen β any encoded characters (%nn) are already decoded by the time you get them, so you don't have to do a single thing about it. obsessed.
not me warning you: you must not free that pointer. don't do it. put the free() down bestie. π
if multiple fields are used β like, a variable that may contain several values β the value you get back contains all of those values concatenated together, with a newline character as the separator. so yeah, one string, newlines between, that's the whole deal. β¨
and the memory allocated by that returned value? it gets automatically freed by the final call to cgiFree(3). so the library's got you, you don't have to babysit it. π
β¨ RETURN VALUE β¨
- on success, a pointer to a string is returned π
- if the variable wasn't transmitted through CGI, or it was empty,
NULLis returned π
β¨ AUTHOR β¨
this CGI library is written by Martin Schulze <joey@infodrom.org>. π§ and fr fr, if you have additions or improvements, please get in touch with him β he wants to hear from you.
β¨ SEE ALSO β¨
and that's the whole page, bestie!! this one's from the CGI Library, dated 6 April 2008 β yeah she's a lil vintage but she still ate. go forth and get those values ππ¦β¨
π¦ where this page comes from
- ubuntu jammy: cgilib 0.6-1.1
- Copyright (c) 1998,9,2007,8 by Martin Schulze <joey@infodrom.org>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms