Codeigniter passing variable to URL
Posted
by
CyberJunkie
on Stack Overflow
See other posts from Stack Overflow
or by CyberJunkie
Published on 2011-01-09T19:43:30Z
Indexed on
2011/01/09
19:53 UTC
Read the original article
Hit count: 153
php
|codeigniter
I have a list of posts and an edit
link for each. When clicking edit
it goes to a page where I can edit the specific post I clicked on. For this I will have to pull from the db the id of the post.
Would this be the correct way to do it?
<a href="<?php echo site_url("post/edit/$row->id"); ?>">Edit</a>
post
is my controller, edit
is my function, and $row->id
should pull the id of the post.
© Stack Overflow or respective owner