codeigniter

How to hide controller name in the url in CodeIgniter?

Hi, so the thing is I'm using .htaccess to hide the index.php but I still get the controller name in the url like that: http://example.com/name_controller/about My question is: is it possible to hide the name of the controller, so that only method is shown? hxxp://example.com/name_controller/about ...

Can I load a "config" file within a config file in CodeIgniter?

I have an "environment" config file that I'm using to separate dev from staging from prod and I'd like to include it in another config file to determine the proper path. ...

CodeIgniter Question: How to delete records using ActiveRecord with mySQL function as WHERE condition

I have a table named ChatSessions where I keep track of active users in the chatroom. I need to prune expired user sessions from the table every 10 minutes. Using pure php-mysql is plain simple but I'm totally clueless how to convert this into ActiveRecord in CodeIgniter. The plain SQL query is below: SELECT * FROM `ChatSessions` WHERE ...

decode mysql query before returning it to view

I'm running a query to mysql that returns encrypted data. I'd like, if possible, to decode the results before sending it to the view. It seems like better form to handle the decoding in the controller (or even the model) rather than inside the view. I can't seem to wrap my head around how to do it, though. I was thinking I could iter...

Is Kohana worth giving up on due to lack of Documentation & Examples?

Hello, I've recently chose Kohana for a new project I'm doing And quite frankly, it's going a bit slow due to lack of resources. I've stumbled again and again on problems that I can't find a solution to Examples are probably the hardest to come by, so I'm considering Switching, especially because I'm only starting and I am still able...

how to Extract the data from http://www.pse.com.ph/servlet/TickerServletFile save into mysql database ?

This should be a code igniter based class, The table header should be Price Percent_change Company Name Company Code Volume Please help any one knows? Many thanks! ...

Xampp and Zend Library Conflicts

Im trying to use the Zend Frameworks ACL library in my code (in codeigniter) and after including the library in my controller I get this error: Fatal error: Cannot redeclare class Zend_Acl in C:\xampp\php\PEAR\Zend\Acl.php on line 48 If I remove the include to the Zend library I get this error instead Fatal error: Class 'Zend_Acl' no...

PHP + Code Igniter Timecode Calculation Logic Error

Hello everyone, I have what I suspect to be a logic problem with an algorithm I am using to work with Video timecode in PHP. All help is appreciated. The Objective Well basically I want to work with timecode and perform calculations For those not familiar with timecode it looks like this 01:10:58:12 or HH:MM:SS:FF 'AKA' HOURS:MINU...

Codeigniter's URL Rewriting Problem

I’ve using the following htaccess script so that i can hide index.php from the uri. RewriteEngine on RewriteCond $1 !^(index\.php|resources|assets|robots\.txt) RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php/$1 [L,QSA] But i’ve facing a major problem :( I’ve a directory named asset...

Twitter like gmail and yahoo mail contacts import in php....

I am using php codeigniter and i am trying to import my contacts from my gmail and yahoomail exactly like twitter... I dont know how to get started? Any suggestion? ...

Codeigniter: Retrieving data from multiple tables and displaying results

Hi, I am developing my first big application using codeigniter and need a little help as I am fairly new to it all. I know how to get records out of the DB and display them, but I now have to get results from two tables and display them. I pass $data to the view, it works fine for $data['prop'] but I can't get the rest. $data['prop']...

Calling controller methods from inside view in Codeigniter

Is there a way to call a method inside the controller from our view using codeigniter.I know it is a bad practice but, now I force to do this.Thank you ...

Displaying data from mutliple arrays with codeigniter

I am trying to display results from a database where the results are contained in three tables. How do I echo out the results? $p-> works, but $img-> or $branch-> doesn't. What am I doing wrong? Example code is below Sample controller: $p_id = $this->uri->segment(3); $this->load->model('One_model'); $data['prop'] = $this-...

Avoiding Zends Error Messages

I am using the Zend Framework for ACL's in codeigniter but if something is not right in the database or there is an error with the code that interfaces with the framework then the framework displays its own error messages. Is there a way to suppress these? ...

Paypal Payflow pro library

I already have an express checkout integrated with my Codeigniter application. Now I want to integrate seamless paypal where I collect the CC information and pass it to Paypal (via backend) and once everything is approved, my application shows that to the user. All this with out ever going to Paypal's website. I know that Paypal gives a...

Passing variables from Model to Model in codeigniter

Hi, I need to pass a variable to model, that model needs to send another back and use that variable to query a different model. EG: I have a product_ID which I send to the product model, From that I find out the supplier_ID. I want to grab that supplier_ID to the supplier model to get the supplier name. How do you implement this in ...

Image upload and jCrop and codeigniter

Hi There, I am trying to build a system that allows a user to select an image from their own computer, and crop it using the jCrop tool from jQuery. My question is can I show the image the user has selected from their system without uploading it to a system, I dont really want to do two uploads, unless I can do the first upload silent...

Codeigniter: validation problem

For some reason a user can login with any password, first I thought I forgot to check for the password but I didn't... and I just cant find the problem here is the model: /*#######################################################*/ function validate() /*#######################################################*/ { $this->d...

turn array into object active record can use

I'm running a query and then decrypting it in the controller. After it is decrypted I was putting the results into an array and sending that to the view. The problem is with this solution I need to rewrite all of my views to parse the arrays sent instead of the active record objects sent before. Is there a way to turn the decrypted arr...

Using Cappuccino JS framework with PHP backend

I have php based application currently written using CI. I want to integrate Cappuccino JS framework at my UI layer. Does anyone know how can one go about doing that? ...