[Klone-users] Create request

thomas fossati tho at koanlogic.com
Mon May 25 12:15:35 EDT 2009


Hi Mickael,

On May 25, 2009, at 5:24 PM, Mickael Auger wrote:
> But today, I wish get all POST data to print directly without parse  
> them and without know their name or their value.
>
> Do you have a function to get all POST data and convert to a string,  
> please ?


you have to create a formatter for your name/value pairs and supply it  
to the vars_foreach function, like the following:

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
<%!
     int postargs_fmt (var_t *v, void *dummy)
     {
         io_printf(out, "<p>%s = %s</p>", var_get_name(v),  
var_get_value(v));
         return 0;
     }
%>
<html>
<head><title>test POST args fmt</title></head>
<body>

<%
     vars_foreach(request_get_postargs(request), postargs_fmt, NULL);
%>

</body>
</html>
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

ciao, t.




More information about the klone-users mailing list