I am using HVC codeigniter.
I wanted to alert the value of variable.

Here's the code on my view.

```
$("#user_table tr").click(function(){    
$userid = $(this).closest('tr').children('td:first').text();
$.ajax ({
          type: "POST",
          url: "manageUser_controller/log_history/$userid",
         success: function(data){
            alert(data);
          }
      });

    });

```

Here's the code on my controller.

```
function log_history($userid) {
    echo $userid;
}

```