提交到CodeIgniter中的新视图

| 我有一个带有with0ѭ和
newFunction()
的控制器。加载索引函数时,它将加载我需要的第一个视图。我在该视图上有一个提交按钮:
<div class=\"btn\"><input type=\"submit\" name=\"submit\" id=\"submit_button\" value=\"Pay\"></input></div>
我希望该提交按钮加载
newFunction()
,作为新页面,现在它正在索引视图下加载
newFunction()
/ view。 这就是我在索引函数中调用的内容,以尝试将新视图加载为新页面。除了将其加载到其正下方。
$submit = $this->input->post(\"submit\");
if($submit == \"Pay\") {
    $this->pay($postData);//pay is the name of newFunction();
}
    
已邀请:
        
public function index()
{
    if($this->input->post(\"submit\") == \"Pay\")
    {
        $this->pay($postData);//pay is the name of newFunction();
        return; // With this, rest of the code wont execute.
    }
}
    

要回复问题请先登录注册