
Hello, I am learning using Codeigniter , can someone tell me or give an example code? what I need in Round Id, we have 111, I want to give it a link and a search database with a value of 111, how to do it? here is the code i tried but still wrong
<div class="row" id="ajaxdata">
<table border="1">
<tr>
<th>Round Id</th>
<th>Player Id</th>
<th>Bet Place</th>
<th>Total Bet</th>
<th>Win</th>
<th>Lose</th>
</tr>
<?php foreach ($tbl_bet_spot as $data) {?>
<tr>
<td><a href="<?php echo site_url('account/detail_round_id?select=111');?>"><?php echo $data->round_id;?></a>
<td><?php echo $data->id;?></td>
<td><?php echo $data->bet;?></td>
<td><?php echo $data->total_bet;?></td>
<td><?php echo $data->win;?></td>
<td><?php echo $data->lose;?></td>
</tr>
<?php } ?>
</table>
</table>
</div>
controller
public function detail_round_id(){
$select = $_GET['select'];
$data['tbl_bet_spot'] = $this->login_model->selectRoundId_by_round($select)->result();
print_r ($data);
}
I am just trying to use my code and now it works, but it is static here
<td><a href="<?php echo site_url('account/detail_round_id?select=111');?>"><?php echo $data->round_id;?></a>
How can I send this value <?php echo $data->round_id;?>to the controller correctly ? Many thanks.
source
share