Web Application Development - PHP Sessions

Discussion in 'PHP' started by arestia, May 29, 2005.

  1. #1
    Hmm I’ve been having this problem when developing a new web application. Any help would be appreciated by any PHP gurus here.

    Basically the problem I’m having is regarding PHP sessions, Multiple Forms, and having a directory structure.

    For some reason the first forms I developed were in a directory (i.e. /folderA/formname.php) and sent a request to /folderA/functions/processformA.php to process the data entered into the form.

    These first forms worked fine.

    But now when I am developing forms in other directories with the same sessions I am having a problem.

    The form is in a different directory (i.e. /folderB/formname.php) and it is set to send to /folderB/functions/processformB.php for processing. But for some reason the form is told to submit to /folderB/functions/processformB.php but is instead trying to submit to /folderA/processformB.php and so I get a 404 error because that file does not exist.

    Regular http requests to the files in these directories work fne, but i only have the problem when trying to POST or GET from a Form.

    I am new to using sessions but have knowledge of PHP. I’m thinking that for some reason the paths are being messed up.

    Any help would be appreciated

    -Dan
     
    arestia, May 29, 2005 IP
  2. J.D.

    J.D. Peon

    Messages:
    1,198
    Likes Received:
    65
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Forms, on their own, don't have much to do with PHP - it's just HTML. Check your log file to see the exact URL that was submitted by the browser when you get a 404 response.

    J.D.
     
    J.D., May 29, 2005 IP
  3. frankm

    frankm Active Member

    Messages:
    915
    Likes Received:
    63
    Best Answers:
    0
    Trophy Points:
    83
    #3
    copy & paste the <FORM> tag , that would help.
    but you probably should check change it to:
    <FORM ACTION="/folderB/functions/processformB.php"> ... </FORM>
     
    frankm, May 29, 2005 IP
  4. kc3

    kc3 Peon

    Messages:
    857
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    0
    #4
    By any chance is your form in php and you have a variable in the url with the wrong text?
     
    kc3, May 30, 2005 IP
  5. netprophet

    netprophet Banned

    Messages:
    288
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #5
    netprophet, Sep 8, 2006 IP