Background $_POST ?

Discussion in 'PHP' started by ignas2526, Aug 27, 2008.

  1. #1
    Hello,
    Not sure how to call thing i need:
    I trying to create a form submitting in two parts:
    After form is submitted content will go to form1 who will check some things and add visitors ip. Wan content will be posted again but it will be submitted to form2 who will save content in text.
    Any ideas how submit from form1 to form2 in background?
    I was thinking on using header('Location: http:url.com/index.php?contactus=sent&something=1&text=234'); but is there other ways?
    Thanks
     
    ignas2526, Aug 27, 2008 IP
  2. EricBruggema

    EricBruggema Well-Known Member

    Messages:
    1,740
    Likes Received:
    28
    Best Answers:
    13
    Trophy Points:
    175
    #2
    No there are no otherways, except if you like to include the page again, but that's not realy an option.
     
    EricBruggema, Aug 27, 2008 IP
  3. JAY6390

    JAY6390 Peon

    Messages:
    918
    Likes Received:
    31
    Best Answers:
    0
    Trophy Points:
    0
    #3
    You can use sessions of course, and carry the data from page to page that way
    http://www.php.net/manual/en/ref.session.php
    http://www.w3schools.com/PHP/php_sessions.asp
    http://www.tizag.com/phpT/phpsessions.php

    They should get you on your way
     
    JAY6390, Aug 27, 2008 IP
  4. ignas2526

    ignas2526 Peon

    Messages:
    75
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Well i actually in very confusing situation: one host supports writing to file, but doesn't show ip, and second shows ip, but does not support SMTP and writing to file.
    I am not sure about sessions, because first form collector and checker is on one server, and writer to file in other :D
     
    ignas2526, Aug 28, 2008 IP
  5. JAY6390

    JAY6390 Peon

    Messages:
    918
    Likes Received:
    31
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Ah. Well you might be able to do this with CURL, although I won't swear to it
     
    JAY6390, Aug 28, 2008 IP
  6. rcadble

    rcadble Peon

    Messages:
    109
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #6
    You could use my HTTP socket wrapper =]

    http://www.rcadble.net/viewcode.php?id=20

    
    $wrapper = new sWrapper();
    $html = $wrapper->request("POST", "http://www.somesite.com/page.php", "http://www.somesite.com/referer.php", "data1=hello&data2=there&data3=supd00d");
    Code (markup):
     
    rcadble, Aug 28, 2008 IP
  7. ghprod

    ghprod Active Member

    Messages:
    1,010
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    78
    #7
    Btw u want this process in one time? or user must click twice?

    if u want to click twice just put var from post in from 1 with type="hidden" but if u want to be in one proccess i think just arrange ur php in single php i think :p

    Thnx
     
    ghprod, Aug 28, 2008 IP
  8. Supah Fly

    Supah Fly Peon

    Messages:
    21
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #8
    Supah Fly, Aug 29, 2008 IP