
git-svn-id: https://svn.code.sf.net/p/rathena/svn/athena@172 54d463be-8e91-2dee-dedb-b68131a5f0ec
25 lines
509 B
C
25 lines
509 B
C
|
|
|
|
void generate_sample(int sock_in, char *query, char *ip)
|
|
{
|
|
|
|
char *name = get_param(query, "name");
|
|
|
|
web_send(sock_in, "<title>SAMPLE</title>\n");
|
|
|
|
|
|
//If a name was not entered...
|
|
if ( name == '\0' )
|
|
{
|
|
web_send(sock_in, "<form action=\"/testing/\" method=\"GET\">\n");
|
|
web_send(sock_in, "<input type=\"text\" name=\"name\">\n");
|
|
web_send(sock_in, "<input type=\"submit\">\n");
|
|
}
|
|
else
|
|
{
|
|
web_send(sock_in, "Your name is: ");
|
|
web_send(sock_in, get_param(query, "name"));
|
|
}
|
|
printf("OK!\n");
|
|
}
|