Hello,
I am building a system in which the user can build thre own navigation menu from a selection of catergories, the way it works is that is they click on 'Blog' they they can get an accordion titled 'Blog' and on expanding this they see all the blog titles, however as the moment, my application creates multiple accordions if there ...
My scope of knowledge on php Frameworks is limited to 4, CakePHP, Symphony, Zend and CodeIgniter (sort by preference)
I want to know which one I could choose to build my personal CMS (which suits best for that purpose) ..
Best,
...
Hello , I'm trying to build a short uri service with CI just so i can learn CI faster
anyway .. i got stuck at the routing
i hid the index.php then added the following route $route['([A-z0-9]{4})'] = "/forward/redirect/$1";
but it just shows my default controller
i also tried with htaccess
RewriteBase /
RewriteCond %{REQUEST_FILE...
I'm a little hesistant against to use it because I believe there can be some issues with it, but I don't really know it before I've tried it. Or is it good enough to use it or should I do plain sql statements? Does anyone know?
...
Based on the backend data i may have n number of items displayed along with the check box and textarea for selecting and give commnet on the page and there is also a option given to the user to remove the items based on the requirements. I need to set a validation like atlease one item is required.
Since its number is based on the query...
I simply need to add a validation class that limits a numerical entry from being greater than 24.
Is this possible with CI's default validation classes or will I have to write a custom validation class?
...
So ....
There are obviously many questions that all have been asked about Singletons, Global State Variables, and all that great stuff. My question is,
If Singletons and Globals are So Bad, Why are they used so often?
The following examples are simply ones off the top of my head that I believe are used by a good chunk of people.
I g...
Not sure if this can be done but it seems my main issue is because i have a default route to a method called "index." I want to be able to list all users tagged with a specific keyword. In addition, users can search for other users based on these keywords.
i.e.
www.domain.com/tags/apples
www.domain.com/tags/oranges
www.domain.com/tags/b...
In my validation class I have this:
$fields['a_1'] = 'First Question';
$fields['a_2'] = 'Second Question';
$fields['a_3'] = 'Third Question';
$fields['a_4'] = 'Fourth Question';
This is getting old--I have about 40 of these to write, and each set has matching validation rules:
$rules['a_1'] = 'hour';
$rules['a...
Here's the lowdown. PHP, Codeigniter, LAMP.
I've created a fixeee for you all to see my code. http://fixee.org/paste/s8jc04t/
Whenever I have mulitple file uploads (ex. fileupload1, fileupload2, fileupload3, etc.) and I tried to get the upload data from each one correctly, I seem to duplicate the first file data that was uploaded. Can...
I think I'm missing some simple here, but I can't figure it out for the life of me.
I'm using the set_radio() and set_checkbox() methods to return their values if validation fails, like this
<input type="radio" name="gender" value="male" <? if(!isset($thankyou)) { echo set_radio('gender', 'male'); } ?>/>;Male
<br />
<input type="radio...
Hi fellow programmer
I want to ask if I need to do this query in my app
select qty, type from tItem where qty=0 and (type=1 or price=100)
How do I do that using active record in code igniter?
because if i do
$this->db->where('qty','0');
$this->db->where('type','1');
$this->db->or_where('price','100');
the query would be like
se...
Hi,
I am trying to create authentication for my php website. I am using the codeigniter framework. I will have to validate the session in all the pages of my website. So to avoid the code repetition, i am planning to do it in a helper function. Now that my user credentials are
in my database i would like to access the model to query th...
I understand how to do it w/ a plain form w/o existing values, but let's say I have a view that I can call via http://domain.com/account/settings. let's say I have two fields, username, password and city, which are all pulled from the DB (except for password of course). So, if a user tries to submit the form and fails validation for what...
Hi
I'm relatively new to CodeIgniter and am making my first CI project in which there are user-accounts, etc. In the past, I have always used PHP's $_SESSION variable to this end. However, CI seems to have its own session mechanism, which it claims is "better"
CI's session mechanism seems to store all the data in a cookie? Personally I...
Is there a syntax for documenting functions which take a single configuration array, rather than individual parameters?
I'm thinking specifically of CodeIgniter-style libraries, which use a mechanism similar to this:
<?php
//
// Library definition
//
class MyLibrary {
var $foo;
var $bar;
var $baz;
// ... and many more vars......
Oddest bug.
I'm parsing a template and inserting same values pulled from a db. I also have a model set up that logs some statistics each time the parsed page is viewed(all brought together in the same method). Trouble I'm having is that the stat is logged three times in the db. Identical values on three different rows.
I am using some ...
it was well and fine when i was xampp 1.7.2.
When installed xampp 1.7.3 and run my site from localhost, it shows
load->database(); $this->load->helper(‘url’); $this->load->helper(‘html’); } function entry_insert() { $data1 = $this->upload->data(); //echo $data[‘file_name’]; $data = array( ‘user_id’=> $this->session->userdata(‘id’,TRU...
Hi
I'm trying to write a function in a CodeIgniter controller which can take optional parameters. However, I always get Missing Argument warnings. I'm not trying to suppress the warnings - I'm trying to declare the parameters as optional (maybe they could be empty strings if they don't exist, or something).
What is it I'm missing?
Tha...
Hi
I have the following code in controllers/list.php:
<?php
class List extends Controller {
function index()
{
echo "hi";
}
}
?>
However, trying to access it gives me the following PHP error:
Parse error: syntax error, unexpected T_LIST, expecting T_STRING in /var/www/whimventory/htdocs/system/application/contro...