Problem in getting Value through POST method
-
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="https://www.example.com/login"> <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:
<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="https://www.example.com/checkout?amount=<?php echo $_REQUEST['amount']; ?>&amount_title=<?php echo $_REQUEST['amount_title']; ?>" /> </form>
And on Checkout Page following is the code:
<?php echo $_REQUEST['amount']; ?> <?php echo $_REQUEST['amount_title']; ?>
Every thing is working perfect. The value of the ‘amount‘ is echoing perfectly on Checkout Page but the value of ‘amount_title‘ is not echoing proper.
I want the value to be echoed as “I just want to pay this amount.” But it is echoed as “Ijustwanttopaythisamount.”
I want the sentence with the space in between words. Plz help me to get solution.
Thanks
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Problem in getting Value through POST method’ is closed to new replies.