Jump to content

Passing email variable


frizzo

Recommended Posts

I am trying to pass an email variable from a signup form to a second page, before finally posting the output to an order form.

 

The form will look like this:

 

<html>

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

 

 

How can I capture the email address from this form and post the output into signup2.php so it can be inserted into my redirect URL?

 

Redirect URL:

 
header("Location: http://somesite.com/?email=" . $_POST["email"]); 

 

Thanks for any help.

 

 

 

 

Link to comment
Share on other sites

Maybe I misunderstood what you were trying to do.

 

If you have a Input Form on a page, there is no reason why you couldn't post the info like in your first post into a new URL like that.

 

Just whatever script is set in your action= would be the one doing the header.

Link to comment
Share on other sites

Here is the raw PHP code of signup2.php

 

There is a second form submission on "signup2.php" that points to a particular header redirect.

 

I don't understand how to get the email variable from a text box on the form that posted to "signup2.php" into the header redirects as show in the code below.

 

<?php 
$paytype=${"button"};
$payselect=${"payselect"};

// ---------------------------------------------
if ($paytype=="Pay Now")
{


  if ($payselect=="lifetime")
  {


    if ($_POST["OPTIN"]=="ON")
    {

      if ($_POST["OPTIN1"]=="ON")
      {

// -------------------------------------------- 
        header("Location: http://1.publisher.pay.clickbank.net/?email=" . $_POST["email"]);
      }
        else
      {

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

    }
      else
    {

      if ($_POST["OPTIN1"]=="ON")
      {

// -------------------------------------------- 
        header("Location: http://3.publisher.pay.clickbank.net/?email=" . $_POST["email"]);
      }
        else
      {

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

    } 


  }
    else
  if ($payselect=="2yr")
  {


    if ($_POST["OPTIN"]=="ON")
    {

      if ($_POST["OPTIN1"]=="ON")
      {

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

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

    }
      else
    {

      if ($_POST["OPTIN1"]=="ON")
      {

// -------------------------------------------- 
        header("Location: http://7.publisher.pay.clickbank.net/?email=" . $_POST["email"]);
      }
        else
      {

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

    } 


  }
    else
  if ($payselect=="1yr")
  {


    if ($_POST["OPTIN"]=="ON")
    {

      if ($_POST["OPTIN1"]=="ON")
      {

// -------------------------------------------- 
        header("Location: http://9.publisher.pay.clickbank.net/?email=" . $_POST["email"]);
      }
        else
      {

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

    }
      else
    {

      if ($_POST["OPTIN1"]=="ON")
      {

// -------------------------------------------- 
        header("Location: http://11.publisher.pay.clickbank.net/?email=" . $_POST["email"]);
      }
        else
      {

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

    } 

  }
    else
  {

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

} 


?>
<form name="paymethod" action="<? echo $_SERVER["PHP_SELF"];?>" method="post"></strong>

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.