CodeIgniter callback in helper
How I can call my callback in a helper? If i create the callback in the controller works fine, but if I create it in a helper, CI does not call it automatically. ...
How I can call my callback in a helper? If i create the callback in the controller works fine, but if I create it in a helper, CI does not call it automatically. ...
I've been having a lot of troubles with this for the past few hours right now and I'm really not seeing where the problem is. Every single code snippet I find on the Internet is telling me I'm doing it right, but for some reason, nothing is working. Basically, I have a form that requires fields to be dynamically added depending on the n...
Hi, this is yet another .htaccess question. And I already did my literature review. Would appreciate any help. Requirements: Force HTTPS only for a few URLs. Browser shouldn't say partially encrypted page for SSL pages. I am using CodeIgnitor and tweaked the *base_url* in config.php to: $config['base_url'] = (isset($_SERVER['HTTPS...
I am trying to use flot to plot some data that is pulled from a MySQL db. I am log users login visits and I have a SQL function that will retreive the number of visits per day for a given month, getStats($day). I have read some examples online how to properly do this but for some reason when I try and graph the array data in my javascrip...
Hello, I am hoping for some advice, imagine if you will will you are on a website and you are greeted solely with navigation menu, on click the navigation menu that is situated within the left hand side of the screen you can add various content to the right side of the screen that is loaded in individual ‘divs’ then collapsed in accordi...
Isn't having all of the files in public view a bad thing? Surely things such as /system/application/config/database.php should not be publicly visible! ...
Is it possible in CI (natively) to log into two different files from two different controllers? I haven't found such option in user manual nor any solution in Google. Is there any 3rd party logging library available for CI? ...
The following line is giving an error message. $query = 'SELECT * FROM products AS p LEFT JOIN categories AS c USING ON c.id = p.category_id WHERE c.name = "Galleri1" AND p.status = "active"' ; $Q = $this->db->query($query); Data base structure. CATEGORIES CREATE TABLE IF NOT EXISTS `categories` ( `id` int(11) NOT NULL AUTO_INCR...
What would be the easiest way to include a CI file? Let's say I want to include http://example.com/ci/index.php/mycontroller/ on example.com example.com doesn't run CI and I can't do include('ci/index.php/mycontroller'). ...
I'm using the MVC framework CodeIgniter for my work, if it's relevant. In one of my pages/controllers, I want to capture the HTML outputted by another page on the site as a string (to use as an email or newsletter). I tried: $string = file_get_contents('http://www.examplesite.com/path/to/page'); But $string just becomes false, which ...
One of the parameters in the CodeIgniter database config is the following ['pconnect'] TRUE/FALSE - Whether to use a persistent connection What do you recommend I set this to? Is there a significant performance hit if I set it to FALSE? What potential problems might arise from setting it to TRUE? ...
I'm trying to create a fairly simple form that has a few checkboxes and input fields and a textarea. Nothing is required by itself; however, if 'A' checkbox is checked, then 'A' input field is required (and so on for the couple other checkboxes I have). I have the above functionality in place, but I'm having a tough time figuring out h...
I'm a noob to CodeIgniter and am trying to figure out the configuration for an app I'm building. Something is wrong with my setup. I'm running XAMPP on Windows and am using an alias directory to point to the applications directory. In other words: "http://localhost/app_name/ " points to the root directory of the application. It all s...
I have a simple C (of CRUD) function, and I'd like to send a message (error or success) along with my redirect from the "insert" function I have written up. Is there a way to adhere a POST field with a redirect? In pseudo code I have: function view_all{ //set up some initial variables $this->load->view(viewing_page, $data) } f...
Hi all. I am trying to deploy a php / codeigniter project to a shared hosting environment. Locally I am running MAMP and all my paths are referenced thus:- background:transparent url(/img/myimj.jpg) left top no-repeat; When I deploy the shared host, these links do not work and to resolve them I need to add "../". Changing all these r...
how to take a report in CSV format in php codeigniter ...
Concerning this post, I'd like to add css,images and js to my codeigniter application. My question is after you add path to your header file href="<?php echo base_url();?>css/moorainbow.css" , where do you actually put your files, is it in system, application, view or controller? I found like 10 articles so far explaining the same proced...
Hi I was following code igniter user guide for forms and I encountered this strange output can anyone tell how to fix it? Here is my code for beginning of the form <?=$attributes = array('class' => 'email', 'id' => 'myform');?> <?=form_open('email/index/', $attributes); ?> I get form with id and class which I specified above but for...
I'm starting a new project with codeigniter, and I'd like to start on a system that's already built so I can reduce the time of development. Is there a good system that handles user authentication along with an admin interface to manage users that can be easily expanded to a web-app? If this is too vague, I can expand ...
Hi I've just started couple of days ago with codeigniter, I have a following problem. When I set value of login button to "" (no value) in order to style it with css properly the login form won't work, the value needs to be login, is there a way arround it I'm sure there is got to be the way.. Here is some code .. Controller : <?php c...