codeigniter

Code Igniter: Disallowed Key Characters in different browsers

I've been developing my first app in codeigniter. It was all working fine last night but when I fired it up this morning I got the error 'Disallowed Key Characters', but then realized this error was only occuring in Firefox & not Safari (where the site loads fine)? What issues do I need to look out for with 'Disallowed Key Characters', ...

Codeigniter: how to serve static html pages in codeigniter context

Hi all I want to serve some static html pages in codeigniter context. I dont want to bypass the index.php file in the base_url. But when I user the call to the HTML file, it dispays the 404 error page. I appreciate any help for this topic from guys who already solving this problem . Thanks for all in advance I want to precise this eleme...

Code Igniter Form - Javascript in PHP Variable. Not for the faint of heart...

Hello, This has got me in a pickle, though I'm sure it's probably fairly easy. I need to get the hash value from the parent window uri, and insert this into the set_value() function. Obviously I can't get a hash with PHP, so it has to be javascript. parent.location.hash works but I've no idea how to get it into set_value(). The fol...

How to handle recursion in views(mvc)?

Hello, I need to recursively iterate over an array in a view and was wondering what are some best practices for this type of situation? I'm trying to avoid building my desired html output in the controller or model. FYI I'm using the framework codeigniter. Thanks for the help! ...

How to load a css in CodeIgniter ?

Hi, I'm new to programming. I want to fetch the css saved in DB and load in a php file. I'm using CodeIgniter. After loading the css, I want to link to it as an external css. I tried following, but it is not working. EDIT: defaultCss.php is the file in which I want to load the css. $strTemplate.="<link rel='stylesheet' type='text/css' ...

Detecting if content was sent prior to a line in a php file in codeigniter

I'm trying to change the way the error files from system/application/errors work by logging the errors and showing a 404 page instead. However, sometimes the error occurs in the middle of a page and I need to display only the error page. I've tried to check if the headers are sent and cleaning the output buffer but it didn't work. Any s...

CodeIgniter Callback Problem

I have an application that allows users to create forms and assign validation to each field (think http://www.phpform.org/ or http://wufoo.com/). I can easily get each field’s name and label from the database, as well as the array of associated validation rules. Say, for example, I wanted to apply a blanket rule of “required” for all of...

PayPal IPN with CodeIgniter

I am trying to implement a membership subscription service on a website built in CodeIgniter. I wish to use PayPal to manage payments, and am having a very hard time implementing this. What I am trying to achieve is: User fills in a membership form with personal details User selects a subscription option (1 of 8 choices - each differe...

mod_rewriting fun with two .htaccess files...one for wordpress and one for CI in a subdirectory

I have a weird situation that's come up, so I'm hoping some one can help me out. I have a wordpress installation in the root directory and a codeigniter installation in a subdirectory (I know, I know...). Both are working fine on their own. The codeigniter installation has its own .htaccess file for rewriting to index.php. But what if ...

getting scriptaculous autocompleter to behave like google instant

You know when you start searching in an autocomplete search box, you get a list of possible results. From those results, say you click one of the items on the list, I want to take that item and perform another search to give another list of results. Just exaclty like how google works. if you dont understand me try typing into google sear...

How to create "remember me checkbox" using Codeigniter session library?

Hello in Codeigniter I am building an Authentication system for my web site and to achieve that I use session library session->set_userdata('username') this will save the session -I believe- for some time I want to provide a "remember me" checkbox in the login form so the user can save the session forever - could not find a way...

CodeIgniter - force_download() problem

Fast to explain, but i cant get it to work: In this simple code, the function force_download simply doesn't make any output. $this->load->helper('download'); $data = file_get_contents("modulos/".$filename); // Read the file's contents force_download($filename, $data); echo $data."/".$filename; Here i just get a white screen, but the ...

In expression engine: Manipulate content of textfields/wygwam-fields?

I would like to manipulate the content of a textfield/wygwam-field in expression-engine. For example, when someone uploads an mp3-file with the file-uploading-tool, I would like to convert the link into a flash-embed that calls an mp3-flashplayer. Another example is that whenever someone posts a link to a vimeo-video I would like to con...

Codeigniter with Smarty causing an error

I'm using Smarty_parser.php and it works well when when I use the parser by itself or if I run the parser then a view call. For example: public function act() { @$this->load->library('smarty_parser'); $data = array('Someinfo'); $this->smarty_parser->parse('contentTmpls/act.tpl', $data); // Load Footer $this->load->vi...

Update MySQL Statement from CodeIgniter

I'm having a problem with this query for some reason: $this->db->query("UPDATE schools SET name = '$name', pop = '$pop', details = '$details', numteachers = '$numteachers', recess = '$recess', equipment = '$equipment' WHERE id = '$schoolid'"); echo $this->db->affected_rows(); For some reason affected_rows prints 0 but there's no erro...

Trouble structuring MySQL query with one-to-many over multiple tables

I have a blog-style app that allows users to tag each post with topics. I keep this data in three separate tables: posts (for the actual blog posts), topics (for the various tags), and posts_topics (a table that stores the relationships between the two). In order to keep the MVC structure (I'm using Codeigniter) as clean as possible, I...

Securing JSON with a codeigniter and jQuery project.

I would like to use JSON, however, the security issues related to using JSON are holding me back. There are two main issues CSRF (Cross Site Request Forgery) and the JSON/Array hack. I have read that Double Submit the Cookie expanding from Secret Hidden Fields are possible solutions to the CSRF problem. I wonder if there are any co...

getting scriptaculous autocompleter to behave like google instant

Possible Duplicate: getting scriptaculous autocompleter to behave like google instant U know when u start searching in an autocomplete search box, you get a list of possible results. From those results, say you click one of the items on the list, I want to take that item and perform another search to give another list of resul...

How does Code Igniter know that index.php is not a directory?

My Code Igniter app has urls like this: http://servername/contexttroot/index.php/Sessions/login/ My question is, when the url is parsed how does Apache know that there isn't a folder called index.php? If I were the parser, that's what I would be looking for :) I know it works and CI's index.php gets called but I don't understand how t...

Codeigniter - Twitter like URI Routing

Say I wanted the following URL scheme, which I got to work by setting the following URI route. http://www.domain.com/profile/jimbob123 $route['profile'] = "profile/index"; $route['profile/(:any)'] = "profile/index/$1"; Now, let's say I want my URL to look like the following when I want to display a "status." http://www.domain.com/pr...