Changing the way a get request is submitted from within a form

Discussion in 'Apache' started by amel, Apr 25, 2008.

  1. #1
    Hi

    Is there any way to change the way that a "get" form sets up the URL? If i have a form.

    <form name="test" method="GET" action="/index">
    <input type="text" name="id" value="2"  />
    <input type="submit" name="submit">
    </form>
    Code (markup):
    Is there a way to make that form submit to a URL of:
    example.com/index/id/2 instead of example.com/index.php?id=2, and to not have it affect the way that the server variables are interpreted or the $_GET variable set up.

    Any help would be appreciated...
     
    amel, Apr 25, 2008 IP
  2. Cybernaut

    Cybernaut Peon

    Messages:
    408
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    0
    #2
    This is not possible AFAIK. You can instead use POST method to avoid query strings in urls.
     
    Cybernaut, Apr 26, 2008 IP