codeigniter

What would be a suitable way to log changes within a database

I want to create a simple auditing system for my small codeigniter application such that it would take a snapshot of a table entry before the entry has been edited. One way I could think of would be to create a for example news_audit table which would replicate all the columns in the news table and create a new record for each change w...

CodeIgniter Error

Hi, I am currently developing a site with codeigniter that uses paypal standard payments. When a payment is made paypal sends the information back to the site using an IPN notification and returns the user to the site along with the info as a PDT. I use both because I am giving digital downloads. Both PDT and IPN verify that the inform...

How to get started on a diet logging script in php/mysql/jquery

Hey guys, hope this isn't too much of a n00b question I'm mainly a front end developer that has recently started to do some back end programming. The script I'm working on is pretty simple (in theory). I just don't know where to begin and was hoping for some advice that will lead me in the right direction. -The script is essentially a ...

Incrementing a table column and getting the new value (codeigniter active record)?

I have something like this: $this->db->set('val', 'val+1', FALSE); $this->db->where('id', $id); $query = $this->db->update(TABLE_NAME); How can I then go and get the new value of 'val'? Do I have to do another select or can I get it off of $query? ...

How to change url in codeigniter www.sample.com/username ?

I have to change www.sample.com/users/user/username to www.sample.com/username when sitename/username it display 404 page. i tried route and uri->segment but i can't. pls help ...

CodeIgniter Routing

I am developing an ecommerce website with CI that has product categories and products. I want to route the URL so that it will go to the products controller, then run the getCategoryByName function for the first segment, then run the getProductByName for the second segment. Here is what I have: URL: products/docupen/rc805 routes.php...

Internationalization on CodeIgniter config files?

I'm trying to do something like: $config['first_link'] = 'lang:pagination_first_link'; $config['prev_link'] = 'lang:pagination_prev_link'; $config['next_link'] = 'lang:pagination_next_link'; $config['last_link'] = 'lang:pagination_last_link'; Is there a simple way to do this ? This configuration is specific to the Pagination config f...

Best jquery inline editor

I have been looking for a really good, well documented jquery plug-in that will let me edit values on click of another button. This plugin is the closest yet, However I am not sure how to get it to save, even in testing. Something really quick that returns the value. I am using this for my php script: function editprofile() { ...

Full site search?

I was hoping someone could give me some advice, I am hoping to implement a full site search on a website that I building with codeIgnitor, PHP and mySQL. I was hoping someone would be able to over me some advice on wheather there are any free API's that enable a full site search, or any tips on building my own, how would be the best way ...

Whats a great dev setup for working with PHP + MYSQL?

I've been a PHP Dev for many years now, and it just dawned on me that maybe I could be using better development tools. For example, my typical setup for development is Notepad ++ Dev WAMP Server (local machine usually) CodeIgniter framework (lately I've fallen in love with it, as it speeds up deployment for me, big time.) PHPMYADMIN ...

Magento vs. CodeIgniter and writing from scratch

Hi, I need to develop an eCommerce website using PHP. I am not sure if to use Magento or use CodeIgniter and write the site basically from scratch. I have experience with CI and no experience with Magento. My questions regarding Magento: Performance: I read that it has performance issues. Is it the case for the latest version too...

retrieve a character encoded portion of the uri?

I am using codeigniter php framework. I have a url that looks like this: www.mydomain.com/controller/function/param however, when the param value has encoded characters such as 'plus%2b' all that I can see (by checking the parameter) is 'plus'. So basically I am loosing all encoded characters and anything that may occur after them. ...

Sitemap for dynamic content?

I am developing a webapp using codeigniter (mvc) and php. I was wondering how do I create a sitemap for search engines when my contact is dynamic? Are there best practices for this, or is there a way to automate the process? I ask because content will be constantly and rapidly added so I'd like the sitemap be recent. Thanks Update: to...

CodeIgniter Auth System

I've written my own model to handle authentication but I was just wondering how I would go about implementing a 'Remember Me' function? To log in a user I simply set the following userdata: UserID(int), LoggedIn(bool) ...

Need a code sample showing how to post to Wordpress using Codeigniter.

Does anyone have a code sample they can share that show how to make a basic blog post to Wordpress using the CodeIgniter xml-rpc library? So far, I have this, which always results in "Bad login/pass combination", although I am using the correct combination. function doPost(){ $this->load->library('xmlrpc'); $bloguser = "theUserid"...

the best way to make codeigniter website multi-language. calling from lang arrays depends on lang session?

Hi friends, I'm researching hours and hours, but I could not find any clear, efficient way to make it :/ I have a codeigniter base website in English and I have to add a Polish language now. What is the best way to make my site in 2 language depending visitor selection? is there any way to create array files for each language and call...

Server keeps creating processes with my php script

Hello all, I am running a php script on a shared hosting server (hostgator). That PHP script is written with the codeigniter framework. Hostgator Shared hosting server only allows 25 processes to run. I have no idea why my script keeps creating the process on the server. The cpanel process server log looks like this: 2221 /usr/bin/p...

Parallel CodeIgniter and Static HTML and htaccess problems

Greetings, all. I am running CI parallel to a static HTML site, with directory structure like so: CI static user_guide .htaccess index.php And I am using the following in my .htaccess file to get the static files. RewriteEngine On RewriteRule ^(application) - [F,L] DirectoryIndex /static/index.html RewriteRule ^([a-z0-9_-]+)\.htm...

show only next and previous link in condeigniter pagination

hi , i use codeigniter pagination class in my project it's works fine for me . but there is no option to tell class just show next and previous link , please see this image i want to show result paged plus I'd like to use to link for next and previous instead of numeric links and when the user click on the next button i'll use ajax to ...

insert data from foreach to database in PHP

Hello everybody ! I use Codeigniter framework .. and I have a form with input fields , when I want to insert the values of inputs fields into database I use this code :( function add($tableName) { $fieldsData = $this->db->field_data($tableName); // to get all fields name of the table like (id,title,post .. ) foreac...