2 回答

TA貢獻(xiàn)1843條經(jīng)驗 獲得超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 關(guān)注
- 213 瀏覽
添加回答
舉報