MDK-ARM Keil, MDK-ARM Datasheet - Page 86

KIT REALVIEW MCU DEVELOPMENT

MDK-ARM

Manufacturer Part Number
MDK-ARM
Description
KIT REALVIEW MCU DEVELOPMENT
Manufacturer
Keil
Type
Compiler and IDEr
Datasheets

Specifications of MDK-ARM

For Use With/related Products
ARM MCUs
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
86
Now, all we need to do is to add code to parse this string and pass any entered
data to our C application.
Exercise: CGI POST Method
This exercise used the CGI POST method to pass input data from a text box to
the underlying C application.
The basic POST method allows you to input data from any HTML form.
However, when the form is reloaded, the default options will be displayed. If
you have a configuration page that uses objects such as radio buttons and check
boxes, it is desirable to display the current configuration. To do this, we need to
employ both the CGI dynamic HTML and the CGI POST method. When the
page loads or is refreshed, the CGI_func() must output the current settings. If
new values are entered, they will be accepted by the CGI_process_data()
function. For a simple text box, the HTML must be modified as follows:
#
#
#
t
t
t
t
t
t
t
t
t
c a
t
t
t
t
t
t
t
The CGI_func() must output the current value held in the text box cell when the
page is loaded.
//
case 'a':
break;
len = sprintf ((S8 *) buf, (const S8 *) &env [4], text1);
HTML with script commands
<HTML>
<HEAD>
</HEAD>
<BODY>
</BODY>
</HTML>
From cgi_func() in HTTP_CGI.c
<TITLE>Post example</TITLE>
<FORM ACTION="index.cgi" METHOD="POST" NAME="CGI">
</FORM>
<TABLE>
</TABLE>
<TR>
</TR>
<TD>
<TD ALIGN="right">
<INPUT TYPE="TEXT" ID="textbox1" SIZE="16" VALUE="%"></TD>
<INPUT TYPE="SUBMIT" ID="change" VALUE="change"></TD>
Chapter 4. RL-TCPnet Introduction

Related parts for MDK-ARM