I modified the HTML file and made the python file containing those HTML tags. But when applying bootstrap CSS to that file, it was not picking up the CSS file from the same cgi-bin folder. So I placed it in the localhost and it worked.
So, to get the form values through CGI, first I did:
For example, the name attribute of an input field is defined as ‘Soil_type’ in the HTML tags. Hence, we can get the value entered in that input field by:
Also, I got some added a line:
The above code was for executing a shell command through python. It was working on my system but giving some error on the server. It may be due to some different configuration on the server than my laptop.
Github Repository link: https://github.com/mandeeps708/cocgi/