codeigniter

"Remember Me" Feature with CodeIgniter's FreakAuth Library

Has anybody been able to implement a "remember me" feature with CodeIgniter's FreakAuth Library? ...

PHP fails silently when php-code is within html tag

PROBLEM UPDATED, READ BELOW For some reason my CI fails silently when loading view. Loading view is simply called from controller $this->load->view('templates/default.php'); Now. There are some functions in the loaded view that are not defined unless a proper helper is loaded as well. Normally, php would throw an error, but instead i...

cakePHP to Code Igniter conversion

I want to convert an application from CakePHP to Code Igniter. Has anyone tried to do this? With my CakePHP application almost all the coding has been done in the controller layer, with the models pretty much exactly as they come out of baking. ...

How to write this SQL statement in CodeIgniter's Active Record

Hello, How to write this SQL statement in Active Record: $this->db->query('SELECT a.slogan, a.brief, u.id, u.name FROM example_tbl AS a, users AS u WHERE u.user_id = "' . USER_ID . '"'); Please help. Thanks. ...

Validating forms with regex in codeigniter

How can I validate a form using regex in codeiginiter. I'd like to check the input against: ^([0-1][0-9]|[2][0-3]):([0-5][0-9])$ I'm assuming the best way is in some sort of callback. I tried a bunch of ideas on the web but I can't seem to get any working. ...

Debug Mode for CodeIgniter?

Does CodeIgniter provide a Debug Mode, for example, when accessing an Invalid URL? Ruby on Rails does show debugging Messages when a incorrect URL has been given, and the controller is unable to resolve it using the routes map. How would I enable such debugging messages in CodeIgniter? The profiler ... $this->output->enable_profiler(T...

Losing URI segments when paginating with CodeIgniter

I have a /payments interface where the user should be able to filter via price range, bank, and other stuff. Those filters are standard select boxes. When I submit the filter form, all the post data goes to another method called payments/search. That method performs the validation, saves the post values into a session flashdata and redir...

jquery and codeigniter

Hello people, and sorry if that question is stupid I'm trying to use javascript with codeigniter and I can't get it right what I'm actually doing is placing jQuery inside the views folder and call it from one of my view files like that: <script type="text/javascript" src="jquery.js"></script> I get no response no errors it just doe...

Update MySQl table onDrop?

Hi all. I am writing a PHP/MySQL application (using CodeIgniter) that uses some jQuery functionality for dragging table rows. I have a table in which the user can drag rows to the desired order (kind of a queue for which I need to preserve the rank of each row). I've been trying to figure out how to (and whether I should) update the data...

PHP/Codeigniter FTP Timout

I'm trying to access an FTP server from my PHP script using Codeigniter's FTP Library. These functions work great, but when testing the script I discovered that if I attempt to connect to a server that does not exist, the script does not terminate with an error message of any kind. The page continues to execute, until the web server giv...

How do I handle user authorization the safest way?

I'm developing a small website where I'm going to allow user to create accounts but I'm quite clueless when it comes to safety around authorizations. I have built my project in PHP with codeigniter and found a library (Tank Auth) that could handle authorization for me. It stores password in a safe way but I'm still worried about the par...

CodeIgniter Validation in Library does not accept callback.

Hey guys, my problem is the following: I am writing a login library. This library has a function _validation() and this uses the validation library to validate the data. With using normal validation methods it works just fine, but using a callback function just does not work. It is not called. I call it like this. $this->CI->form_vali...

Codeigniter redirect with base_url

I noticed that anchor('controller/method') produces a different result than a mere <a href="controller/method"> in that anchor() adds the base_url: anchor('controller/method'): <a href="http://localhost/dts/controller/method"&gt;Link&lt;/a&gt; <a>: <a href="controller/method">Link</a> How do I achieve this same effect (anchor) in ...

codeigniter and OOP general question regarding calling functions, and the parent constuctor

Ok so I have some gaps in my understanding of PHP OOP, classes and functions specifically, this whole constructor class deal. I use both Zend and CI but right now Im trying to figure this out in CI as it is less complicated. So all Im trying to do is understand how to call a function from a view page in code igniter. I understand that m...

Formating a date field in the Model (Codeigniter)

Hi, I', trying to re-format a date from a table in Codeigniter. The Controller is for a blog. I was succesfull when the date conversion happens in the View. I was hoping to convert the date in the Model to have things in order. This is the Model: class Novedades_model extends Model { function getAll() { $this->db->order_by('da...

What's the best way to return stuff from a PHP function, and simultaneously trigger a jQuery action?

So the title is a tad ambiguous, but I'll try and give an example. Basically, I have an 'awards' system (similar to that of StackOverflow's badges) in my PHP/CodeIgniter site, and I want, as soon as an award is earned, a notification to appear to the user. Now I'm happy to have this appear on the next page load, but, ideally I'd like it...

Setting up httpd.conf / mod_rewrite to redirect to codeigniter?

I'm sorry to ask this here, as I'm sure the solution is fairly easy but for the life of my I can't setup httpd.conf on my localhost apache server to automatically load the codeigniter files. Instead I'm having to go into the folder itself localhost/trunk/etc/etc until I get index.php - which messes with some of the relative paths (our b...

Assign a custom global pseudo variable in Code Igniter like {elapsed_time}

Hello As you probably all know Code Igniter can assign pseudo variables using the Parser library, but you also know that if we want to assign a Pseudo Variable to use it in a View, we have to do it in every controller that loads those views with the pseudo variables. I would like to know if Code Igniter 1.7.2 has some way that i can as...

CodeIgniter Form Validation

I am trying to set up validation on a simple contact form that is created using the form helper. No validation at all occurs. What is wrong? In the code below, the “good” keyword always shows, regardless of what is entered into the form, and the saved values set via set_value are never shown. Controller // Contact function contact...

Codeigniter PHP multiwindow issue

Problem arise when user opens multiple window. In my application say when user click on the project info, the project id will be stored in session variable and when saving it will be save against the project. but if the user open project1 and opened project2 in seperate window, there creates a problem when the user clicking save on proje...