Alguien sabe por qué:Código variables POST encendedor
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 } }
se hará eco de las variables de correos en CI por $ _POST pero no para $ this-> input-> post() ;?
Tengo $ this-> input-> post() en uso y trabajando en una página de búsqueda en otro lugar del sitio ... pero en esta página, no funciona ... aquí está mi formulario ... .
<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>
Se mentales ;-P cualquier lugar nada obviamente estúpida me falta?
CI2.1 o CI1.X? Parece CI1, lo que significa que su llamada a '$ this-> input-post()' es incorrecta – Jakub