In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article introduces the relevant knowledge of "how to transfer checkbox data through CGI programs". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!
Transfer checkbox data through CGI program
Checkbox is used to submit one or more option data. The HTML code is as follows:
(yisu.com)
The following is the code for the checkbox.py file:
Example
#! / usr/bin/python3
# introducing CGI processing module
Import cgi, cgitb
# create an instance of FieldStorage
Form = cgi.FieldStorage ()
# receive field data
If form.getvalue ('google'):
Google_flag = "Yes"
Else:
Google_flag = "No"
If form.getvalue ('yisu'):
Runoob_flag = "Yes"
Else:
Runoob_flag = "No"
Print ("Content-type:text/html")
Print ()
Print ("")
Print ("")
Print ("")
Print ("CGI Test instance")
Print ("")
Print ("")
Print ("whether:% s"% runoob_flag is selected)
Print ("whether Google selected:% s"% google_flag)
Print ("")
Print ("")
Modify checkbox.py permissions:
Chmod 755 checkbox.py "how to transfer checkbox data through CGI programs" is introduced here. Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
This article focuses on "how to use conditional comments to judge browsers". Interested friends may wish to take a look at it. The method introduced in this paper is simple, fast and practical. Now let the editor take you to learn how to use conditional comments to judge browsers!
Wechat
About us
Contact us
Product review
car news
thenatureplanet
More Form oMedia:
AutoTimes.
Bestcoffee.
SL News.
Jarebook.
Coffee Hunters.
Sundaily.
Modezone.
NNB.
Coffee.
Game News.
FrontStreet.
GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.