SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Member mkorsmo's Avatar
    Join Date
    Jan 2005
    Location
    St. Paul
    Posts
    14
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Accessing form values without submitting with PHP

    Hello,

    Is it possible to access current form values in PHP without submitting?

    Matt

  2. #2
    SitePoint Wizard swdev's Avatar
    Join Date
    Oct 2004
    Location
    UK
    Posts
    1,053
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    AFAIK No

    PHP is a SERVER side language. You build the form and then send it to the client. Once it is on the client, PHP can't access it.
    The client has to sent the form back to your webserver (whatever script you put in the action tag) before PHP can access it again.

    Hope this helps

  3. #3
    SitePoint Member mkorsmo's Avatar
    Join Date
    Jan 2005
    Location
    St. Paul
    Posts
    14
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for your reply, it confirms what I have found thus far. :/

    Matt

  4. #4
    SitePoint Evangelist
    Join Date
    Sep 2004
    Location
    Oregon
    Posts
    445
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You could look into something that automatically posts the variables (Instant Search) whenever you "leave" the input tab =/

  5. #5
    SitePoint Addict toggg's Avatar
    Join Date
    Jan 2005
    Location
    Auvergne/France
    Posts
    253
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If you don't mind,
    the GET method do it "without submit", just client confirm the URL in browser.

    Thus any javascript by client's browser can submit when desired, possibly on any event.
    à+
    bertrand Gugger toggg.com linux, PHP, Auvergne/France open source

  6. #6

    Join Date
    Oct 2003
    Location
    €uroLand
    Posts
    1,340
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by toggg
    If you don't mind,
    the GET method do it "without submit", just client confirm the URL in browser.

    Thus any javascript by client's browser can submit when desired, possibly on any event.
    à+
    Not really. Basically PHP can only react on HTTP requests and there it doesnt matter whether it comes through the query string (GET) or through the HTTP body (POST), both ways are a "submission".


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •