[Klone-users] GET/POST confused methods
Mickael Auger
mickael.auger at gmail.com
Thu Apr 10 05:25:41 EDT 2008
Hi Thomas,
Sorry for my wrong example. The kl1 file is :
<%!
char* valeur = NULL;
%>
<html>
<body>
<p>
<form method="POST" action="index.kl1?vara=getvara&varb=getvarb">
<input type="hidden" name="vara" value="postvara" />
<input type="hidden" name="varb" value="postvarb" />
<input type="submit" value="Send" name="send" />
</form>
</p>
<%
valeur = request_get_arg(request, "send");
if(valeur != NULL)
{
io_printf(out, "<p>Used method : %i</p>",
request_get_method(request));
io_printf(out, "<p>Receive values :<ul><li>vara : %s</li><li>varb :
%s</li></ul></p>", request_get_arg(request, "vara"),
request_get_arg(request, "varb"));
}
%>
</body>
</html>
GET and POST variables have the same name.
By analogy, PHP, in the quest to recover the variables, there are several
arrays ($_POST and $_GET), which are quite distinct.
There is also the concatenation of these two arrays ($_REQUEST), I need to
separate the GET and POST variables, regardless of the method of the form
(as in the example above).
--
Mickaël AUGER
mickael.auger at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://koanlogic.com/pipermail/klone-users/attachments/20080410/92ad08f1/attachment.html
More information about the klone-users
mailing list