[mapserver-users] asking help about generating html code in python script

Boubacar Bah bahbouba.909 at gmail.com
Mon Sep 13 19:55:54 PDT 2021


hello everyone , recently i create a cgi script in python now i try to
integrate a html in my script  to organize  my web page but it's not work
this my html page below















*con = psycopg2.connect(host="localhost", database="#########",
user="postgres", password=#######, port=5432)cur =
con.cursor()cur.execute("insert into table_1(nom)
values(%s)",(name,))con.commit()print("content-Type: text/html")print"""
 <!DOCTYPE html>   <html>      <head>          <meta charset="UTF-8">
</head>      <body>          hello      </body>   </html>*
*"""*
but this code not work l know the problem is not in the python script code
because l tested the python code alone. but if l add a html the server sent
a error. now l want to know how to integrate a html with python script .
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20210914/d1168c05/attachment.html>


More information about the MapServer-users mailing list