Jump to content

could not get post value submitted from another page


adrianmak
 Share

Recommended Posts

Submission form

<?php

$content = '';
$out = '';

$out .= "<div class='row'>";
$out .= "<div class='col-xs-12'>";
$out .= "<form id='payment-method' method='POST' action='/setexpresscheckout' role='form'>";
$out .= "<div class='radio'>";
$out .= "<label><input type='radio' name='payment_method' value='paypal' checked='checked'>Paypal</label>";
$out .= "</div>";
$out .= "<div class='radio'>";
$out .= "<label><input type='radio' name='payment_method' value='creditcard'>Credit Card</label>";
$out .= "</div>";
$out .= "<div class=''>";
$out .= "<input type='submit' value='Checkout' class='btn btn-success btn-lg' name='checkout' value='Checkout' />";
$out .= "</div>";
$out .= "</form>";
$out .= "</div>";
$out .= "</div>";

$content .= $out;

The form processing template page

<?php

$content = '';

$content .= $input->post->payment_method;

Empty/blank value from posted value

If I changed the form action to self submission, i.e.

$out .= "<form id='payment-method' method='POST' action='./' role='form'>";

I could get the value on the same form.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...