PSP / mod_python ... how to get POST vars on .psp ?

Discussion in 'Python' started by Rod Castellanos, Jun 7, 2005.

  1. Ive been looking everywhere, I need to get a var in my .psp file from
    another one,
    I managed to send it with a form and I can read it with "req.read" but
    it reads all of the variables together separated by a "&" like all
    POST/GET vars.

    How do I store each one in a python var, Im looking for something like
    $_POST and $_GET from php.

    Thanx.
     
    Rod Castellanos, Jun 7, 2005
    #1
    1. Advertising

  2. Rod Castellanos

    Guest

    The documentation states:

    Additionally, the PSP code will be given global variables req, psp,
    session and form.

    In other words, in your PSP page you can access the "form" variable and
    it will
    give you access to the FieldStorage object that PSP creates for you.
    The members
    of the FieldStorage class are documented on the mod_python web site.
     
    , Jun 7, 2005
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Rod Castellanos
    Replies:
    2
    Views:
    775
    Steve Holden
    Jun 7, 2005
  2. Replies:
    1
    Views:
    472
  3. exhuma.twn
    Replies:
    3
    Views:
    346
    exhuma.twn
    Mar 20, 2006
  4. exhuma.twn
    Replies:
    2
    Views:
    532
    exhuma.twn
    Mar 20, 2006
  5. cloc3
    Replies:
    2
    Views:
    347
    cloc3
    Jun 12, 2006
Loading...

Share This Page