I have one controller with an index() and a newFunction(). When my index function loads, it loads the first view that I need. I have a submit button on that view:
<div class="btn"><input type="submit" name="submit" id="submit_button" value="Pay"></input></div>
I want that submit button to load the newFunction(), as the new page, right now it is loading the newFunction()/view under the index view.
This is what I call in my index function to try and get the new view to load as a new page. Except it loads it right under it.
$submit = $this->input->post("submit");
if($submit == "Pay") {
$this->pay($postData);//pay is the name of newFunction();
}
1 Answer