send post without a form

Discussion in 'PHP' started by beermaker74, Mar 11, 2007.

  1. #1
    i have a paypal page that sends my form vars to an encryption page. the encryption page then encrypts my data. The way that I got it to work was to have everything on one page. I didnt like it because i had a bunch of pages I would have to change the code. So i made the second page that just processes the post. So i need to post this

    <form action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post" >
    <input type="hidden" name="cmd" value="_s-xclick">
    <input type="hidden" name="encrypted" value="
    <?PHP echo $encrypted; ?>">
    
    </form>
    Code (markup):
    the cmd value has to be passed. or the encryption fails.

    any suggestions?
    thanks
     
    beermaker74, Mar 11, 2007 IP
  2. Louis11

    Louis11 Active Member

    Messages:
    783
    Likes Received:
    26
    Best Answers:
    0
    Trophy Points:
    70
    #2
    Louis11, Mar 11, 2007 IP
  3. rays

    rays Active Member

    Messages:
    563
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    58
    #3
    auto submitting form using some JavaScript can do trick for you.

    I understand there is one trip from server to client machine but this will be really easy stuff rather than fighting too ling for setting curl library and then using it... there are lot of issues on shared host for cURL

    try this code if you need further more assistance feel free to contact me

     
    rays, Mar 13, 2007 IP