This post was last edited by lljl2009 on 2013-12-09 19:59:49
I am a complete novice, please give me some advice!
The requirements are:
1. There is a form on the page and two buttons, one is save and the other is cancel; the data in the form is read from file a;
2. In the form After the content is modified, click save to save the data to file a, and the current page will still be displayed; click cancel to cancel the changes;
3. The problem is that the form will be submitted repeatedly when clicking refresh. I implemented it with cgi and wrote The simple code is as follows:
show.html:
#include
#include "cgic.h"
#include
#include < ;stdlib.h>
char text_value[]={"AAAAAAAAA"}; // text_value is from a file
void htmlPage()
{
fprintf(cgiOut, "< html>n");
fprintf(cgiOut, "Test Formn");
fprintf(cgiOut, "< body> n");
fprintf(cgiOut, "n");
fprintf(cgiOut, "