Divi WordPress Theme
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Using POST method the Values are not displaying after Login

Discussion in 'Troubleshooting & How-To's' started by Minesh, May 28, 2017.

  1. Minesh

    New Member

    Apr 10, 2017
    Likes Received:
    I am creating an eCommerce theme. I have created 3 Pages – Contribute Page, Login Page & Checkout Page.

    On Contribute Page there is a form. Following is the code:

    <form method="POST" action="login.php">
      <input type="number" name="amount" min="1" placeholder="Total Amount" required>
      <button type="submit" >Continue</button>
      <input type="hidden" name="amount_title" value="I just want to pay this amount." />
    On Login Page there is a Login Form. Following is the code:

    <form name="loginform" id="loginform" action="<?php echo esc_url( site_url( 'wp-login.php', 'login_post' ) ); ?>" method="POST">
                 <li> <input type="text" id="user_login" name="log" placeholder="Email ID" value="" size="20"></li>
                 <li><input type="password" class="form-control" id="user_pass" name="pwd" placeholder="Password" value="" size="20"></li>
                 <li><input type="checkbox" id="rememberme" name="rememberme" value="forever"> Remember me</li>
                 <li><button type="submit" class="btn btn-warning" id="wp-submit" name="wp-submit" value="Log In">Login</button></li>
                 <input type="hidden" name="redirect_to" value="checkout.php" />
                 <input type="hidden" name="amount" value="<?php echo $_REQUEST['amount']; ?>">
                 <input type="hidden" name="amount_title" value="<?php echo $_REQUEST['amount_title']; ?>">
    And on Checkout Page following is the code:

    <?php echo $_REQUEST['amount']; ?>
    echo $_REQUEST['amount_title']; ?>
    My problem is that when I take login the 'amount' & 'amount_title' are not getting displayed on the Checkout Page.

    Plz help me with a solution.


Share This Page

Monarch Social Sharing Plugin