Posts

Showing posts with the label codeigniter

codeigniter is not working after uploading in the server

codeigniter is not working after uploading in the server My site http://www.bishal.prtia.com/prT_base/ throw an 404 error while loading in the server. http://www.bishal.prtia.com/prT_base/ 404 It works perfectly in the localhost . I tried changing everything that mentioned in this forum like changing .htaccess to web.config and changing base url routing config etc but it still throws an error. localhost .htaccess Basically you need to show us your code and the other config to determine the problem – Riyenz Dec 27 '17 at 7:44 should i copy paste the whole code here?? Please specify anything u want to see – Bishal Chhetri Dec 27 '17 at 7:45 have you find the ...

How to put no limit in database- codeigniter

How to put no limit in database- codeigniter I am using this to get results from a database, but it limits to 1 record. I don't want any limit; I tried removing it but that doesn't work . $this->db->from('links'); $this->db->where('uniq', $nnn[0]->uniq); $this->db->limit(1); $q = $this->db->get(); $nnn[0]->linkos=$q->result()[0]; return $nnn; what happens if you remove this line $this->db->limit(1); ? – shyammakwana.me Nov 8 '17 at 22:27 $this->db->limit(1); dont work , i mean that dont effect anything , – Asokh Roy Nov 8 '17 at 22:28 try printing sql query, and check what's final query ...

Undefined Variable and Invalid argument supplied for foreach(Code igniter) [duplicate]

Undefined Variable and Invalid argument supplied for foreach(Code igniter) [duplicate] This question already has an answer here: I have some problem with these codes. I already declared notification but the error keeps showing. Here's my code public function view_notification($id,$token= ''){ $this->isLoggedIn(); $data_applicant = array( // get data using email 'token' => $token, 'applicant_info' => $this->model->getApplicantInfo($this->session->userdata('email'))->row(), 'notifications' => $this->model->notification($this->session->userdata('email'))->result_array(), 'notification' => $this->model->all_notification($this->session->userdata('email'))->result_array(), ); if ($this->session->userdata('position_id') == '3') { // Applicant $this->load->view('...

Store array and update record in database using codeigniter

Image
Store array and update record in database using codeigniter I am storing dynamic array as well as update the "max_quantity" table in database. The problem is that when update the record than it will sum all the quantity values and subtract it from the 1st value of "max quantity table". But I want that array of quantity is subtracted its own quantity value which is present in the database. This is my code in view <?php $i=1; foreach($result as $row){ ?> <td class="pr-right" style='width:130px; text-align: center; '> <input type="text" min="1" step="1" name="quantity" step="1" class="container" value="" onfocus="this.value = '';" onblur=";" style="width: 60px" id="quantityT<?php echo $i;?>" onkeyup="CalculatePrice (<?php echo $i;?>,<?php echo $row->max_quantity; ?...

how to change the function name in the url using codeigniter?

how to change the function name in the url using codeigniter? I want to change the function name in the url, i searched for this a lot but unable to find any solution, can any one help me out what should i do consider for example i have a url like http://localhost/codeIgniter_try/index.php/Blog/blogvieww , http://localhost/codeIgniter_try/index.php/Blog/blogvieww so here "Blog" is the controller name and "blogvieww" is the function name so if i want to change the function name from "blogvieww" to "blogvieww_all" what can i do? Blog.php <?php defined('BASEPATH') OR exit('No direct script access allowed'); class Blog extends CI_Controller { public function index() { $this->load->view('blogview'); } public function blogvieww() { $this->load->view('blogvieww'); } }...

How to block emoticons from input text field in codeignitier

How to block emoticons from input text field in codeignitier I want to make input text field in such a way that it will block emoticons entry in text input field. I have made validation on controller for particular route by passing.Is it is a right way to block emoticons. Controller code. $this->form_validation->set_rules('registration', 'Registration', 'required|alpha_numeric'); $this->form_validation->set_rules('odometer', 'Odometer', 'required|alpha_numeric'); view code: <input type="text" name="odometer" placeholder="Odometer" class="form-control profileControl odometer required number" id="odometer-<?php echo $vehicle_count; ?>" value="<?php echo $vehicle->intCarOdometer ?>"/> <input type="text" placeholder="Registration" name="registration" class="form-control profileControl registration req...

CodeIgniter and GIT: What not to check-in?

CodeIgniter and GIT: What not to check-in? This is my first attempt with CodeIgniter and I'm trying to figure out how to configure it against a GIT repo. The basic idea here is to avoid checking-in framework files and somehow keep only my work in GIT. What is the default/best practice here. Do people commit entire codeigniter folder into source control? Looking at the default .gitignore file, it doesn't look like they want to exclude framework folders like system and user_guide etc. .gitignore system user_guide My idea is to keep XAMPP and CodeIgnitor in default location ( c:xampp ) and keep my code in source code in, say D:My ProjectsNewExcitingWebsite (with models , views and controllers folders therein) and then redirect codeigniter to look towards that folder by setting variables in config files. Is that the correct way to go? If yes, how do I set path for Controllers ? There is a variable for views folder that can be set, but none for controllers and models. c:xampp...