codeigniter

Reorder Data in Table using jquery each

半城伤御伤魂 提交于 2020-07-23 07:40:20
问题 I have this set of data pulled from the database. The prices are different but some data are redundant. Here's the screenshot of the data. The table that I want it to look like is this. I arranged them in jQuery using .each() but what I got is an epic fail. Only the header and first body row is correct. Here's my code: var route_price_table = ''; route_price_table = '<table class="table table-bordered table-striped"><thead><tr><th>SEA</th>'; var initial_boxname = ''; var iterator = 0; var

CodeIgniter login and session

女生的网名这么多〃 提交于 2020-07-22 18:43:26
问题 I am currently building a web for student registration and I am using CodeIgniter. I already managed to insert the form to my database and I am using email and password from the submitted form to login. I got a problem in my login page,somehow it cant check either the email or password exists on the database or not and it cant redirect to my desired page either. This is my controller public function index() { $data = ''; if($this->input->post('submit')) { $this->form_validation->set_rules(

Why is my upload path invalid? (Codeigniter-Library)

主宰稳场 提交于 2020-07-21 06:30:11
问题 I'm creating a library as part of a project and one of the methods is a wrapper for the upload helper. The method: public function upload(){ echo "Doing upload"; $config['upload_path']= RESOURCE_PATH . "Downloads"; $config['allowed_types']='pdf|doc'; $config['max_size']='10000'; //echo $config['upload_path']; $this->CI->load->library('upload',$config); if(!$this->CI->upload->do_upload()){ echo "Couldn't do the upload"; echo $this->CI->upload->display_errors(); echo $config['upload_path']; }

CSS Not Working With CodeIgniter

狂风中的少年 提交于 2020-07-21 05:17:10
问题 Here is a part of my CI code: class page extends CI_Controller { var $Page; public function __construct() { parent::__construct(); $this->Page = 1; $this->load->model('posts_model'); $this->load->helper('url'); } public function index() { $data['posts'] = $this->posts_model->get_posts($this->Page); $this->load->view('header'); $this->load->view('main', $data); $this->load->view('footer'); } function page_num($page) { $this->Page = $page; $data['posts'] = $this->posts_model->get_posts($this-

CSS Not Working With CodeIgniter

两盒软妹~` 提交于 2020-07-21 05:16:00
问题 Here is a part of my CI code: class page extends CI_Controller { var $Page; public function __construct() { parent::__construct(); $this->Page = 1; $this->load->model('posts_model'); $this->load->helper('url'); } public function index() { $data['posts'] = $this->posts_model->get_posts($this->Page); $this->load->view('header'); $this->load->view('main', $data); $this->load->view('footer'); } function page_num($page) { $this->Page = $page; $data['posts'] = $this->posts_model->get_posts($this-

Simple Codeigniter form validation

纵饮孤独 提交于 2020-07-19 04:20:15
问题 I am having some problem in my login form like this I want to display an individually error beside of each field here is the controller function index() { $this->form_validation->set_rules('username','Username','trim|required|exact_length[4]|xss_clean'); $this->form_validation->set_rules('password','Password','trim|required|min_length[4]|max_length[40]|xss_clean|callback_login'); $this->form_validation->set_rules('jabatan','Jabatan','trim|required|xss_clean'); if($this->form_validation->run()

Simple Codeigniter form validation

风流意气都作罢 提交于 2020-07-19 04:19:23
问题 I am having some problem in my login form like this I want to display an individually error beside of each field here is the controller function index() { $this->form_validation->set_rules('username','Username','trim|required|exact_length[4]|xss_clean'); $this->form_validation->set_rules('password','Password','trim|required|min_length[4]|max_length[40]|xss_clean|callback_login'); $this->form_validation->set_rules('jabatan','Jabatan','trim|required|xss_clean'); if($this->form_validation->run()

fetch data from database in index.php in codeigniter

亡梦爱人 提交于 2020-07-13 15:54:44
问题 I have blog which is related to a cashback in codeigniter franework. and i have database of offers. i want to fetch all offers from database to index.php (view). this is my default. The problem is how to fetch data in index.php . index.php is my main page of my website. what i have tried user.php (controller) public function testing() { $this->load->view('user/index.php'); $this->load->model('showoffers'); $offers = $this->showoffers->showoffersmodel(); $this->load->view('showoffers',['offers

fetch data from database in index.php in codeigniter

余生长醉 提交于 2020-07-13 15:54:22
问题 I have blog which is related to a cashback in codeigniter franework. and i have database of offers. i want to fetch all offers from database to index.php (view). this is my default. The problem is how to fetch data in index.php . index.php is my main page of my website. what i have tried user.php (controller) public function testing() { $this->load->view('user/index.php'); $this->load->model('showoffers'); $offers = $this->showoffers->showoffersmodel(); $this->load->view('showoffers',['offers

fetch data from database in index.php in codeigniter

核能气质少年 提交于 2020-07-13 15:53:08
问题 I have blog which is related to a cashback in codeigniter franework. and i have database of offers. i want to fetch all offers from database to index.php (view). this is my default. The problem is how to fetch data in index.php . index.php is my main page of my website. what i have tried user.php (controller) public function testing() { $this->load->view('user/index.php'); $this->load->model('showoffers'); $offers = $this->showoffers->showoffersmodel(); $this->load->view('showoffers',['offers