question on Python CGI - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

question on Python CGI

andohungandohung Posts: 23Member
im trying to write a messageboard using python
i have some difficulties with linking the to the messages

say there is a link on the message title, how do I allocate the message content with that link???

I saw other people use address like this:
http://www.xxx.com/msgboards/msg.cgi?board=news&view=4i8hheyj

where i guess the "4i8hheyj" is the message id for the script to locate the message content

how do i use Python to manipulate the bunch of information after the address .../msg.cgi? (?board=news&view=4i8hheyj)

anyone help pls???

Comments

  • infidelinfidel Posts: 2,900Member
    : im trying to write a messageboard using python
    : i have some difficulties with linking the to the messages
    :
    : say there is a link on the message title, how do I allocate the message content with that link???
    :
    : I saw other people use address like this:
    : http://www.xxx.com/msgboards/msg.cgi?board=news&view=4i8hheyj
    :
    : where i guess the "4i8hheyj" is the message id for the script to locate the message content
    :
    : how do i use Python to manipulate the bunch of information after the address .../msg.cgi? (?board=news&view=4i8hheyj)

    Try writing a script like this:

    [code]
    #!/usr/bin/python

    import cgi

    form = cgi.FieldStorage()

    print "Content-type: text/html
    "

    cgi.print_form(form)
    [/code]

    It should give you some hints. Also check the documentation on the cgi module.


    [size=5][italic][blue][RED]i[/RED]nfidel[/blue][/italic][/size]

  • infidelinfidel Posts: 2,900Member
    Check the messages further down on this board. DJ and I were working on an event calendar cgi script a while back. Haven't heard from him in a while, but our progress is here for you to see.


    [size=5][italic][blue][RED]i[/RED]nfidel[/blue][/italic][/size]

Sign In or Register to comment.