2
I’m passing two parameters http://localhost/topsamp-ci/votar/4-Slug-de-algo
public function votar($id) {
echo $id;
die;
}
And it returns me 4-Lug-de-something. I wanted to just recover the ID but displaying in the url the two parameters, as I do this?
My route is like this:
$route['votar/(:any)'] = 'Home/votar/$1';
Voting button
<a href="<?= base_url("votar/{$row->id}-{$row->slug}"); ?>" class="btn btn-vote">VOTAR</a>
It worked man, I’ll leave anyway for safety thank you!
– viniciussvl
I was going to do that, but I was making a mistake I had to wait 7 minutes haha, vlw!
– viniciussvl