codeigniter

PHP: Download incoming email from POP3 or IMAP, parse it, and mark it as read/delete on server.

Hi there, I'm trying to add incoming email to my web application. It's built on CodeIgniter and PHP, and as far as I can tell I haven't found any CI libraries to do this. What I'd like to do is have a controller that connects to my mail box, via POP3 or IMAP, and retrieves the message, parses it then removes it from the server. Piping...

Limiting mySQL data as 5 column 2 entries per column 1 entry.

Hey there, I'm new to mySQL, so my poor knowledge of the languages might be precluding me from searching for the result I need. I am building a simple application in CodeIgniter that will access the Twitter API and return a table of status updates for a certain number of various users. I would like to limit this to showing 5 updates per...

Dynamic Navigation in CodeIgniter

I'm looking at the demo videos at the CodeIgniter site and browsing through the documentation but its is unclear to my how I can achieve dynamic navigation from one page to another, depending on user input. For example I'd like to have a login form that will either forward to a "success page" or a "login failed page". Where should I p...

How would I structure this in Zend Framework?

I'm coming from CodeIgniter, and the terminology overlap between it and other MVC frameworks (particularly Zend) is giving me a mental block of some kind. I want my users to visit http://mysite.com/do/this. I understand that "do" is the Controller, and "this" is a function (well, method) within that Controller. My site will have commo...

Getting Uploadify to work with Codeigniter ?

Has anyone been able to get uploadify to work with codeigniter? Everything I try it will not upload. ...

Advice for setting up Aptana for CodeIgniter?

I've used Aptana for a good number of web projects and like it a lot. I've also used CodeIgniter for a couple projects and liked it, as well. Now I'm hoping to combine the two in a happy marriage of cross-platform productivity. Any advice on setting up Aptana's more useful features? I'm hoping to get any of the following: Code completi...

Where does $row come from?

I am learning codeigniter and have a question. The codes are from http://www.devshed.com/c/a/PHP/Paginating-Database-Records-with-the-Code-Igniter-PHP-Framework/ The followings are model and controller. And it does not define $row but it still works. (The original had typo, so I fixed it.) Q1. Where does $row come from? Q2. Could you ...

CodeIgniter, ZF, etc.

I use ZF a lot and I like it very much. I've learned how to solve a big part of perfomance problems with ZF, so it's became not "enormous" and "monstrous" for me. But I'd like to know if there are any as powerful frameworks as Zend for PHP. Maybe CodeIgniter is? What is it? What are its cool features? Anything else? And, are there any ...

Dependent insertion of data into MySql table

I have 2 tables: user_tb.username user_tb.point review_tb.username review_tb.review I am coding with PHP(CodeIgniter). So I am trying to insert data into review_tb with the review the user had submitted and if that is a success, i will award the user with some points. Well this look like a very simple process. We will first insert th...

Why adding $this->models. make it faster?

I was playing around with this code. http://programmersvoice.com/tag/code And I noticed that the following line. $this->load->model($this->models."pagemodel", 'pages'); I compare this with $this->load->model("pagemodel", 'pages'); This is what codeigniter's document http://codeigniter.com/user_guide/general/models.html#loading sug...

How to modify .htaccess so that it points to a sub-folder in codeigniter

Codeinginter provide .htaccess file as explained below. It is from CI User Guide. However when I add this file in xampp/htdocs/mycodeigniter, and point to http://127.0.0.1/mycodeigniter/somepage, it goes to http://127.0.0.1/xampp which is the root file in htdocs. How can I fix the file so that it points to http://127.0.0.1/mycodeignite...

How to add html_entity_decode to array?

I am making a content entry with TinyMCE in codeigniter. However the output source is like the following and does not show < and >. Instead it shows HTML enties like and etc. The entry is made by admin after logged in. Output comes from database. I took out escape in model, but it still does the same thing. Also I have a config ...

Image upload with Codeigniter, Redux and SWFUpload. "Not Authenticated" when browser uploads.

I have an image upload form in a secured (with Redux) admin area of my website. When SWFAddress uploads it's not seen as logged in. I created a multiple image upload form with SWFUpload and a back-end script with CodeIgniter. To cut a long painful story short - it all worked fine and dandy with the security turned off for testing purpos...

What is the second parameter doing in model("pagemodel", 'pages')

I have following model and controller. And database table pages has id, title, content and slug. Q1. Why does the line in controller, $this->load->model("pagemodel", 'pages'); // Load the page model, have 'pages'? Is it naming "pagemodel" as pages? And I see a line, $page_data = $this->pages->fetch($page_slug); // Pull the page...

Why does this code add id="active" to html?

The following view code produces html code as follows. Q1. what is the first line doing? <?php $ci_uri = trim($this->uri->uri_string(), '/'); $att = ' id="active"';?> Q2. Why producing id="active"? Q3. What are the purpose of <?= substr($ci_uri, 0, 7) == 'example'? $att: ''?> <?= $ci_uri == $this->config->item('FAL_login_ur...

Validating multidimensional arrays in Code Igniter with form_validation library

I'm having a weird problem with the form_validation module of code igniter. I'm trying to validate multi dimensional arrays from the form post, but its not working as expected. I've used this a hundred times (exaggeration) with standard form posts so I'm familiar with it. My form post looks like this Array ( [location_edit_id] =>...

How to use ssl with codeigniter?

How can I have CodeIgniter load certain pages using ssl? I have an apache2/mode_ssl server. I only want certain pages to use ssl. mod_ssl uses a different document root than non-secure pages. For example: https (port 443) would serve pages out of /var/www/ssl_html/ And http (port 80) serves pages out of /var/www/html/. How would I get co...

In trying to follow MVC, where should each of these elements go?

This is my first foray into "appropriately" using an MVC construct (with Code Igniter). I'm hoping some guru can wave her hands and tell me where the following code elements belong. I have them written, I just want to plunk them in the "right" spot! Call a DB and see if we have a user signed up Route to a signup page Route to the main ...

How to use captcha_pi.php in Codeigniter.

I followed this page http://codeigniter.com/wiki/captcha/, it does not work. I tried to find other tutorial about how to use it. However I failed all. Can anyone direct me a tutorial which works and explains well about how to use this captcha_pi plug-in please? Thanks in advance. Controller <?php class Prova extends Controller { ...

Code Igniter Facebook URL errors

I'm currently having issues with my Facebook app being ported to CI from raw PHP. The issue I'm having is that I have a CI driven redirect: function signedin() { echo "signed in?"; } function save_user_data() { $insert['uid'] = $_POST['uid']; $this->db->insert('users', $insert); redirect('signedin'); { Based upon how all of the ...