Welcome Guest, Not a member yet? Register   Sign In
Search Results
    Thread: Set up IonAuth 4
Post: Set up IonAuth 4

I'm trying to set up IonAuth 4 within CI4. The documentation says that there are 2 ways to copy the installation files. 1. Copy the files to the subfolders in the App folder, (so the controller to...
316 Views
0 Replies
08-10-2020, 11:53 AM
Wouter60
    Thread: CodeIgniter 4 Playground
Post: RE: CodeIgniter 4 Playground

I've been waiting for a long to get into CI4, but now I want to give it a try. I have a project folder named d:\wamp64\www\ci4_test, where I installed CI4 with composer. From my project folder, I ...
115,532 Views
67 Replies
12-24-2019, 07:06 AM
Wouter60
    Thread: why models are not loading in autoload
Post: RE: why models are not loading in autoload

Make sure your models are in the application/models folder and start with a capital letter. When loading a model with $this->load->model( ... ) don't use a capital letter. So, it's perfectly ok to ...
3,339 Views
10 Replies
12-14-2019, 02:20 PM
Wouter60
    Thread: calling javascript function
Post: RE: calling javascript function

That's right. There's a chance that it only works if you also use the closing tag: PHP Code: -- --
2,683 Views
6 Replies
12-10-2019, 07:02 AM
Wouter60
    Thread: calling javascript function
Post: RE: calling javascript function

richb201 Wrote: (12-09-2019, 08:09 PM) -- My php code is running along fine. At some point I make this call: $this->load->view("javascript_funcs_extensionloaded","snapshot_mode2"); -- $this->load-...
2,683 Views
6 Replies
12-10-2019, 12:02 AM
Wouter60
    Thread: How display checked filter variable value in url
Post: RE: How display checked filter variable value in u...

Simply use $this->input->get('color') in your controller to fetch the variable that was passed in the query string. You don't need to change the setting of $config['enable_query_strings'). If you wou...
1,347 Views
2 Replies
11-25-2019, 12:59 PM
Wouter60
    Thread: get value option in controllers
Post: RE: get value option in controllers

The controller function that should get the values for user_id and status is getrepairbyuser(). The form in your view points to the function: repairbyuser(). This way, the post values won't reach t...
2,529 Views
4 Replies
11-07-2019, 12:48 PM
Wouter60
    Thread: How to inherit attribute for hidden/show form field
Post: RE: How to inherit attribute for hidden/show form ...

Create validation rules only for fields that are visible. E.g. field10 and field11 are only visible if field4 has a value: PHP Code: -- if ($this->input->post('field4')) {   $this->form_validat...
2,768 Views
4 Replies
10-30-2019, 02:03 PM
Wouter60
    Thread: model in view, or passing from view strange behavior
Post: RE: model in view, or passing from view strange be...

Quote: -- Pass the $record variable inside your loop to your model that they pass to the view. -- No, pass the $record variable inside your loop to your model, library or helper that will give...
2,948 Views
8 Replies
10-29-2019, 11:08 AM
Wouter60
    Thread: model in view, or passing from view strange behavior
Post: RE: model in view, or passing from view strange be...

It sure looks like unexpected behavior. If I do this in a view: PHP Code: -- //$records is the result from my model, passed by the controller Echo ''; Foreach($records as $record) {   Prin...
2,948 Views
8 Replies
10-29-2019, 09:14 AM
Wouter60
    Thread: model in view, or passing from view strange behavior
Post: RE: model in view, or passing from view strange be...

It's bad practice to call a model function from a view. Typically, a model is used to retrieve information from your database. You should call the model inside your controller, not inside a view. Af...
2,948 Views
8 Replies
10-28-2019, 12:44 PM
Wouter60
    Thread: passing name instead of id
Post: RE: passing name instead of id

Well, does it work now?
5,774 Views
24 Replies
10-28-2019, 10:50 AM
Wouter60
    Thread: passing name instead of id
Post: RE: passing name instead of id

Quote: -- what about this line is this right ? -- Something is telling me that this line can't be correct, otherwise you wouldn't be asking, would you? It appears to me that you don't understa...
5,774 Views
24 Replies
10-27-2019, 07:44 AM
Wouter60
    Thread: passing name instead of id
Post: RE: passing name instead of id

Your controller has this line: PHP Code: -- $config["total_rows"] = $this->Model_movie_genre->movies_by_genre($genre_type); -- The model function: PHP Code: -- public function movies_by_g...
5,774 Views
24 Replies
10-27-2019, 04:48 AM
Wouter60
    Thread: passing name instead of id
Post: RE: passing name instead of id

$config['total_rows'] should be a numeric value (0 or greater), not an array!
5,774 Views
24 Replies
10-26-2019, 08:48 AM
Wouter60
    Thread: passing name instead of id
Post: RE: passing name instead of id

Right before PHP Code: -- $data["links"] = $this->pagination->create_links(); -- insert this: PHP Code: -- echo ''; print_r($config); echo ''; die(); --
5,774 Views
24 Replies
10-26-2019, 02:30 AM
Wouter60
    Thread: passing name instead of id
Post: RE: passing name instead of id

Quote: -- Backtrace: File: C:\xampp\htdocs\ciprojects\showtime\application\controllers\Movies_genre.php Line: 64 Function: create_links -- What is on line 64 of your controller?
5,774 Views
24 Replies
10-26-2019, 01:58 AM
Wouter60
    Thread: passing name instead of id
Post: RE: passing name instead of id

Your model returns $query->result_array(); The result is an array with each record as an associative array. To address an element in this array, you have to use: PHP Code: -- $row['genre_type'] ...
5,774 Views
24 Replies
10-26-2019, 01:30 AM
Wouter60
    Thread: model in view, or passing from view strange behavior
Post: RE: model in view, or passing from view strange be...

Show us what my_function() function in your object looks like. What type of object is it? CI uses objects (classes) in controllers, models and libraries. You load a library in a controller with $th...
2,948 Views
8 Replies
10-25-2019, 12:29 PM
Wouter60
    Thread: Custom Form Errors
Post: RE: Custom Form Errors

You can use an AJAX call the check the number of addresses for the current users. The AJAX function in your controller returns the value to your view, without a page refresh.
1,304 Views
4 Replies
10-25-2019, 12:22 PM
Wouter60

Theme © iAndrew 2016 - Forum software by © MyBB