Web Hosting
  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

    Joined:
    Apr 10, 2017
    Messages:
    2
    Likes Received:
    0
    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:

    HTML:
    <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." />
    
    </form>
    On Login Page there is a Login Form. Following is the code:

    Code:
    <form name="loginform" id="loginform" action="<?php echo esc_url( site_url( 'wp-login.php', 'login_post' ) ); ?>" method="POST">
              <ul>                                                 
                 <li>Email</li>
                 <li> <input type="text" id="user_login" name="log" placeholder="Email ID" value="" size="20"></li>
                 <li>Password</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>
              </ul>
                 <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']; ?>">
    </form>
    And on Checkout Page following is the code:

    PHP:
    <?php echo $_REQUEST['amount']; ?>
    <?php 
    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.

    Thanks.
     
    #1

Share This Page

Web Hosting