[SOLVED]Dynamic URI and Validation problem. |
[eluser]FnTm[/eluser]
Hi everyone! I am currently working on 2 very similar homepages, and ive run into some problems with the validation. So i have my site with some news and stuff. When an admin clicks on an edit link either at the front end of the site, or in the admin backend, it sends you to a page like http://www.mysite.com/index.php/site/news/3 So i use the uri segment method to get the right news item to edit. All of this works very well. But when i try to edit something, and it fails to validate, how should i take someone back to that page? How do I add the uri segments to my Code: $this->load->view() Thanks FnTm
[eluser]Ebot Ndip-Agbor[/eluser]
Try using Code: $this->uri->uri_string()
[eluser]FnTm[/eluser]
controllers/news Code: */ views/edit Code: <? Really "clean" code, needs a lot of revising, but im just trying to get this sorted out before i start anything else. Anyone could tell me where to put that script from the bottom of wiki page? Because im in sorta of rush.
[eluser]Ebot Ndip-Agbor[/eluser]
I took a look at the wiki article you mentioned. Try addiing this to your view Code: <?php instead of Code: echo form_open('admin/news/edit_check'); ?>
[eluser]FnTm[/eluser]
Thanks, but that is not the issue. What i REALLY would like to find out is, where do i put script, that makes use of the Code: @field EDIT: Problem solved Just had to make a map inside my applications folder named scripts, make a file, and put all of the code inside the file. None other stuff needed. The just load the script with the load function. Will clean my code, and have this thing up and running in no time. Thanks batangai for your input on this subject, really appreciated your trying to help me.
|
Welcome Guest, Not a member yet? Register Sign In |