reload table data

reload table data

mohammad6006mohammad6006 Posts: 2Questions: 0Answers: 0
edited January 2015 in Free community support

I can not reload table data after insert or delete records
i create php page named : function.php
in this file i have function :

function table_show_users() {

    global $useropr;

    $all_user = $useropr->all();

    foreach ($all_user as $key => $value) {

        if ($key % 2 <> 0) {
            echo "<tr class=\"odd gradeX\"><td>{$value['id']}</td><td>{$value['username']}</td><td>{$value['password']}</td><td class=\"text-center\">{$value['first_name']}</td><td class=\"text-center\">{$value['last_name']}</td><td><span class=\"glyphicon glyphicon-edit\"></span>
<a href=\"#\"><span data-toggle=\"modal\" data-target=\"#delconfirm\" data-id={$value['id']} class=\"glyphicon glyphicon-remove\"></a></span></td></tr>";} else {echo "<tr class=\"even gradeC\"><td>{$value['id']}</td><td>{$value['username']}</td>
<td>{$value['password']}</td><td class=\"text-center\">{$value['first_name']}</td>
<td class=\"text-center\">{$value['last_name']}</td>
<td><span class=\"glyphicon glyphicon-edit\"></span>
<a href=\"#\"><span data-toggle=\"modal\" data-target=\"#delconfirm\" data-id={$value['id']} class=\"glyphicon glyphicon-remove\"></a></span></td>
                                        </tr>";
        }
    }
}

so in main page 'index.php'
i call this function between '<tbody>'
table_show_users();

in this page i have insert new record form or delete

but after sumbit i can not reload data table without refresh page

what api i need to use?

i test reloadajax() but not work

This discussion has been closed.