I have a registration form that collects several parameters.
i need to pass all these AND a confirmation code (generated by the controller) to the model for inserting in the DB.
How can I do that?
is there a way to pass the whole post to the model, eg like
$this->model->insert($this->input->post(), $confirmation_code)?
...
I'm using Codeigniter's "timespan()" function to give a human readable phrase of how much time has elapsed since an event: "5 days, 3 hours, 12 minutes, 1 second", but I don't need to go down to the minute or second level.
Is there any way to turn that off?
...
whenever using a framework it's so good with a api reference so you could lookup the classes' methods and properties, which class they extend from and so on.
is there a api reference for codeigniter similar to yii's excellent api referenc?
http://www.yiiframework.com/doc/api/
how else could you know more about the details about the c...
in yii i could have mvc components (acts like an own application). could i have this too in codeigniter?
eg. in SYSTEM/APPLICATION have a folder called COMPONENTS and in there i put stand-alone applications that would be a part of the application. components like ADDRESS BOOK, MAIL, TWITTER and so on. every component folder has folders ...
In a controller you can use this method to load a view, but I want to know what happens behind the scenes here.
I'm new to PHP and frameworks, but I’ve learned the basics of OOP.
When $this->view() is called then the method in the current class or the parent class is used.
But what does $this->load->view() mean? What is the intermedi...
in codeigniter you can use wildcard to reroute.
i never heard the word wildcards before.
is this a set of rules you can use like regexp?
cause in codeigniter documentation they just gave some examples eg.
$route['product/(:num)'] = "catalog/product_lookup_by_id/$1";
is there a list/reference with all the available wildcard expressio...
Okay, I am pretty new in CI and I am stuck on pagination. I am performing this pagination on a record set that is result of a query. Now everything seems to be working fine. But there's some problem probably with the link. I am displaying 10 results per page. Now if the results are less than 10 then it's fine. Or If I pull up the entire ...
in code igniter you can type:
$query = $this->db->query("YOUR QUERY");
foreach ($query->result() as $row)
{
echo $row->title;
echo $row->name;
echo $row->body;
}
i guess that the query method returns the object it's part of. am i correct?
if i am, how do you type the line where it returns the object?
so what i wonder is ho...
does someone know roughly when CodeIgniter 2.0 will be released?
some weeks or months?
cause i can see a book about it in the bookstores coming soon.
...
Dear Exparts,
In codeIgnator frame work the below is my code working properly.But i cannot control the table width. So,when a long value come into the table then table going to extra large width.But i need to wrap the outcomes data.So,How i can fixed the table width? Pls see my code below..
///controller code///
$config['ba...
Hi Folks
Basically for my webapp I'm trying to organise it a bit better. As it at the moment, every time I want to load a page, I have to do it from my controller like so:
$this->load->view('subviews/template/headerview');
$this->load->view('subviews/template/menuview');
$this->load->view('The-View-I-Want-To-Load');
...
I am researching possibilities of using memcached as a session storage for a system built on CodeIgniter. Has anybody done this before(that's probably a stupid question :) and if so what's your experience folks? Have you used any existing libraries/extensions?
As far as performance improvement what have you seen? Any caveats?
...
should i use Classname() or __construct() as constructor in CodeIgniter?
both work, which should i use?
...
I want to create an array of objects, so what I did was to create a library but I can't figure out how to actually dynamically create instances of it in a loop and store each instance in an array.
Can anyone tell me please?
...
i want to port my application to CodeIgniter but i am wondering whether i should use their v2.0 or v1.72 (then when they release 2.0, upgrade it).
i have never used a framework before so i don't exactly know what implies when upgrading a framework: what does it mean practically - i just move the folders and it will work? or do i have to...
I have a few pages that require login, so all controllers that link to these pages start with
$this->checkSession();
//...rest of the code
CheckSession should verify the session is still live, otherwise display a message and stop the execution of the rest of the code in the controller:
function checkSession()
{
if (!$this->sessi...
I have used href link in the flexigrid rows. on Click it takes me to another page. But on click of the row its making the href link to disappear and its visible only after unselecting row.
Is there any option to stop selecting the row in flexigrid or how to make the link test visible even on selecting the rows.
Please need ur help immd...
I have some data that I have to display as a table.
I think I should pass the data from the controller as $data['events'] = array(.....
and then load the view to display them.
<?php
$this->load->library('table');
echo $this->table->generate($events);
?>
this doesn't work though - it gives a Fatal error: Call to ...
I'm getting a strange behaviour from form_dropdown - basically, when I reload the page after validation, the values are screwed up.
this bit generates 3 drop downs with days, months and years:
$days = array(0 => 'Day...');
for ($i = 1; $i <= 31; $i++)
{
$days[] = $i;
}
$months = array(0 => 'M...
Hey, so this is one of those questions that seems obvious, and I'm probably going to feel stupid, but here goes:
I'm doing a CodeIgniter site with a search. Think of a Google type input, where you'd search for "white huskies." I have a search results page that takes a URI (MySite.com/dogs/white huskies), and takes the third part, and ...