samedi 27 juin 2015

getting data from post array using codeigniter

I'm trying to post an array that is "name="std_id[]"" from view page.But in controller while trying to print the array using "print_r($std_id)" I can't find any data. The code is given below..

In view page:

<?php

foreach ($all_student as $v_student) { ?>

std_id ?>" name="std_id[]"> std_name; ?>

In controller function:

    $std_id = $this->input->post("std_id[]", true);
    print_r($std_id);
    exit();

Aucun commentaire:

Enregistrer un commentaire