Html forms by ZSERVER.LIB

Hello
I try make two forms(as two diferent www pages) which is generate by ZSERVER. I call this pages in index.
I call two function: init_netform(); and init_rs232form(); bud only first form is good. Second form is incomplete and it doesn’t work. Can anybody tell me how I make two forms, which will work good? Where I have a error? :frowning:

i have defined:

#define FORM_ERROR_BUF 256
#define HTTP_NO_FLASHSPEC

and in main i call this function:

void init_netform()
{
static FormVar netform[4];
auto int var,form;
auto int function;

form = sspec_addform(“net.html”, netform, 4, SERVER_HTTP);
function = sspec_addfunction(“launched”, launched, SERVER_HTTP); //call lauched()
sspec_setformepilog(form, function);

sspec_setformtitle(form, "Ethernet interface settings");

 var = sspec_addvariable("ip", ip, PTR16, "%s", SERVER_HTTP);
var = sspec_addfv(form, var);
sspec_setfvname(form, var, "IP unit");
sspec_setfvdesc(form, var, "Using X.X.X.X whitch X= 1-255");
sspec_setfvlen(form, var, 16);

var = sspec_addvariable(“mask”, mask, PTR16, “%s”, SERVER_HTTP);
var = sspec_addfv(form, var);
sspec_setfvname(form, var, “Maska jednotky”);
sspec_setfvdesc(form, var, “Using X.X.X.X whitch X= 1-255”);
sspec_setfvlen(form, var, 16);

var = sspec_addvariable(“gw”, gw, PTR16, “%s”, SERVER_HTTP);
var = sspec_addfv(form, var);
sspec_setfvname(form, var, “Gateway”);
sspec_setfvdesc(form, var, “Using X.X.X.X whitch X= 1-255”);
sspec_setfvlen(form, var, 16);

var = sspec_addvariable(“port”, &lport, INT16, “%d”, SERVER_HTTP);
var = sspec_addfv(form, var);
sspec_setfvname(form, var, “Listen port”);
sspec_setfvdesc(form, var, “Using 1-64000”);
sspec_setfvlen(form, var, 5);
sspec_setfvrange(form, var, 1, 65000);

}

void init_rs232form()
{
static FormVar dateform[4];
auto int var,form;
auto int function;

 strcpy( baudspeed, baudspeed_options[0]);

 strcpy(parity, parity_options[0]);

 strcpy(databits, databits_options[0]);
  strcpy(stopbits, stopbits_options[0]);

form = sspec_addform(“date.html”, dateform, 4, SERVER_HTTP);
function = sspec_addfunction(“launched”, launched, SERVER_HTTP);
sspec_setformepilog(form, function);

sspec_setformtitle(form, "RS232 settings");

var = sspec_addvariable(“BaudSpeed”, baudspeed, PTR16, “%s”, SERVER_HTTP);
var = sspec_addfv(form, var);
sspec_setfvlen(form, var, 16);
sspec_setfvname(form, var, “Destination”);
sspec_setfvdesc(form, var, “Set yout data speed in baud/s”);
sspec_setfvoptlist(form, var, baudspeed_options, NELEMENTS(baudspeed_options));
sspec_setfventrytype(form, var, HTML_FORM_PULLDOWN);

var = sspec_addvariable(“Databits”, databits, PTR16, “%s”, SERVER_HTTP);
var = sspec_addfv(form, var);
sspec_setfvlen(form, var, 16);
sspec_setfvname(form, var, “Destination”);
sspec_setfvdesc(form, var, “Set your databits”);
sspec_setfvoptlist(form, var, databits_options, NELEMENTS(databits_options));
sspec_setfventrytype(form, var, HTML_FORM_PULLDOWN);

var = sspec_addvariable(“STOPbits”, stopbits, PTR16, “%s”, SERVER_HTTP);
var = sspec_addfv(form, var);
sspec_setfvlen(form, var, 16);
sspec_setfvname(form, var, “Destination”);
sspec_setfvdesc(form, var, “Set your STOPbits”);
sspec_setfvoptlist(form, var, stopbits_options, NELEMENTS(stopbits_options));
sspec_setfventrytype(form, var, HTML_FORM_PULLDOWN);

var = sspec_addvariable(“Parity”, parity, PTR16, “%s”, SERVER_HTTP);
var = sspec_addfv(form, var);
sspec_setfvlen(form, var, 17);
sspec_setfvname(form, var, “Destination”);
sspec_setfvdesc(form, var, “Set your parity”);
sspec_setfvoptlist(form, var, parity_options, NELEMENTS(parity_options));
sspec_setfventrytype(form, var, HTML_FORM_PULLDOWN);

}