Anyone know why:
class Booking extends Controller {
function booking()
{
parent::Controller();
}
function send_instant_to_paypal()
{
print_r($_POST);
echo '<hr />';
print_r($this->input->post());
echo '<hr />';
$id_booking = $this->input->post('id_booking');
$title = $this->input->post('basket_description');
$cost = ($this->input->post('fee_per_min') * $this->input->post('amount'));
echo $id_booking;
echo $title
echo $cost
}
}
Will echo post variables in CI for $_POST but NOT for $this->input->post();?
I've got $this->input->post() in use and working on a search page elsewhere in the site... but on this page, it's not working.. here's my form...
<form id="add_funds" action="' . site_url('booking/send_instant_to_paypal') . '" method="post"> <input type="text" name="amount" id="amount" value="" /> <input type="hidden" name="id_booking" id="id_booking" value="0" /> <input type="hidden" name="basket_description" id="basket_description" value="Adding Credit" /> <input type="hidden" name="fee_per_min" id="fee_per_min" value="' . $fee_per_min . '" /> <input type="submit" value="Add to basket" /> </form>
It's mental ;-p Anyone spot anything obviously stupid I'm missing?
$this->input-post()
is wrong – Jakub