[eluser]Unknown[/eluser]
Hi all!
On this site that I'm coding I have a page that is accessible through the following urls:
Code:
http://site.com/campaigns/view/
which displays a default view of all campaigns and
Code:
http://site.com/campaigns/view/8
which displays details for campaign 8
On this page I have a form from which you can add subscribers a the specific campaign.
My controller logic goes
something like this:
Code:
$campaign_id = $this -> uri -> segment(3);
$this -> campaign_model -> get_campaign_details(3);
// Form was submitted
if ($this -> input -> post()) {
//code to check inputs and save subscriber
} else {
// Display page with campaign details
}
Now my problem is, in the else branch, how would I go about displaying the page with the campaign details. I've tried
Code:
redirect("campaigns/view/8")
which creates a redirect loop and also
Code:
$this -> load -> view("campaigns/view/".$campaign_id)
which of course tries to load a view 8.php that doesn't exist.
So how would I go about implementing the functionality for something like this?
Thanks in advance!
Jim