Table of Contents
Home
Web Front-end
HTML Tutorial
Submit to the current page, how to solve the problem of refreshing the repeated submission form? _html/css_WEB-ITnose



Submit to the current page, how to solve the problem of refreshing the repeated submission form? _html/css_WEB-ITnose
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, "
fprintf(cgiOut, "< body> n");
fprintf(cgiOut, "n");
fprintf(cgiOut, "