2 回答
TA贡献1843条经验 获得超7个赞
在您的控制器中:
<?php
defined('BASEPATH') OR exit ('No direct script access allowed');
class Abc extends CI_Controller {
public function index(){
$this->load->view('codingregi');
}
public function save(){
$this->load->database();
$this->load->model('Done');
$data = array(
'Name' => $this->input->post('name'),
'Email' => $this->input->post('email'),
'Password' => $this->input->post('password'),
'Gender' => $this->input->post('gender')
);
$this->Done->savingdata($data);
redirect('Abc/index');
}
}
?>
在你看来
<form method="POST" action="<?= base_url() ?>/abc/save">
- 2 回答
- 0 关注
- 190 浏览
添加回答
举报