An example Clickbank payment link is http://5.PUBLISHER.pay.clickbank.net.

In order to pass data such as an email address into the order form, the email variable needs to be passed through the following example code.

http://5.PUBLISHER.pay.clickbank.net?email=someone@someone.com

So what I am asking is, how can I capture the email address from my signup form, pass it through my payment page, and insert it into the actual payment link that posts to the order form?

    If you have a text box on a form for the e-mail address, and the form is being POSTed, the e-mail address will appear in the $POST array:

      $_POST["email"] = "someone@someone.com";
    

    If you want to get the e-mail address from the URL, as in the example you have provided, this will appear in the $GET array:

      $_POST["email"] = "someone@someone.com";
    

    Whichever method is used, you should be able to retrieve the information quite easily and use it for your own use.

      So is this correct for collecting the email from the form to POST to signup2.php?

      <html>
      <head>
      <title>My Variables HTML Form</title>
      </head>
      <body>
      <form action="signup2.php" method="<? $_POST["email"] = ""; ?>"
      email: <input name="email" type="text"><br>
      <input type="submit">
      </body>
      </html>
      

      It seems to post correctly in the URL, but I can't seem to get it from signup2.php to the order form.

      I am using header redirects like this:

      // --------------------------------------------_44-90
              header("Location: "."http://5.publisher.pay.clickbank.net");
            }
              else
            {
      
      // -------------------------------------------- _34-95
              header("Location: "."http://6.publisher.pay.clickbank.net");
            } 
      

      Would this affect the process of getting the email variable posted?

        If you've got the form like that, it would probably be better doing the following:

        <html> 
        <head> 
        <title>My Variables HTML Form</title> 
        </head> 
        <body> 
        <form action="signup2.php" method="post" target="_self">
        email: <input name="email" type="text"><br />
        <input type="submit">
        </form>
        </body> 
        </html>
        

        This will place the e-mail variable within the $_POST array when submitted to signup2.php. You can then reference $POST["email"] within signup2.php with your header redirection:

          header("Location: http://5.publisher.pay.clickbank.net/?email=" . $_POST["email"]);
        

        This will place the e-mail address from your previous input form into the URL in the correct format.

          Wow, that was very easy.

          Thank you, sir.

            7 days later
            Write a Reply...