Welcome, Guest
You have to register before you can post on our site.

Username
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 12,948
» Latest member: johndias
» Forum threads: 68,997
» Forum posts: 429,298

Full Statistics

Latest Threads
How do i redirect user to...
Forum: CodeIgniter 4 Support
2 hours ago
» Replies: 2   » Views: 120
CodeIgniter 3.1.10 Releas...
Forum: News & Discussion
2 hours ago
» Replies: 14   » Views: 5,129
File upload validation wi...
Forum: CodeIgniter 4 Support
10 hours ago
» Replies: 0   » Views: 42
Why Codeigniter is better...
Forum: Choosing CodeIgniter
Yesterday, 01:39 AM
» Replies: 13   » Views: 3,218
CI tutorial from David Co...
Forum: Lounge
01-22-2019, 07:44 PM
» Replies: 13   » Views: 1,212
Library: "Dates and Times...
Forum: CodeIgniter 4 Support
01-22-2019, 02:14 PM
» Replies: 2   » Views: 178
Codeigniter database conn...
Forum: General Help
01-22-2019, 10:20 AM
» Replies: 2   » Views: 102
How to deal with large up...
Forum: CodeIgniter 4 Support
01-22-2019, 10:19 AM
» Replies: 3   » Views: 160
Top RSA library for php
Forum: General Help
01-22-2019, 10:19 AM
» Replies: 9   » Views: 208
Project Update 2019.01.04
Forum: News & Discussion
01-22-2019, 02:52 AM
» Replies: 15   » Views: 5,421

 
  form_open() Error MSG: Trying to get property of non-object
Posted by: swingman - 01-17-2019, 10:48 AM - Forum: General Help - Replies (2)

I am using this form post with jQuery Datatables
I am getting a error on the page when it loads indicating "Message: Trying to get property of non-object"

<?php echo form_open('myController/ajaxSaveProduct/' . $this->encryption->encrypt($productData->id), array('method' => 'POST', 'role' => 'form', 'accept-charset' => 'utf-8', 'enctype' => "multipart/form-data", 'id' => 'productForm'));

<table id="productTable">
<thead>
<tr>
<th>Product</th>
<th>Description</th>
<th>Value</th>
</tr>
</thead>
<tbody>
<tr>
<td>Tire</td><td>Large Black Tire</td><td>Desc 1435</td>
</tr>
</tbody>
</table>
<button id="saveProduct">Save</button>


<select style="width:100%;" name="value[1]" data-bind="value: product_1" id="product_1" class="form-control" onchange="valueChange()">
<option value="">Choose Yes / No</option><option value="yes">Yes</option><option value="no">No</option></select></td></tr><tr id="62" data-attribute-attributeid="62" data-attribute-controltypeid="1" data-attribute-description="Desc 1428" data-attribute-title="Test MA 1428" role="row" class="even"><td>Test MA 1428</td><td>Desc 1428</td><td><input style="width:100%;" type="text" name="attributeValues[62]" data-bind="value: attribute_62" id="attribute_62" value="xxxx-0001" class="form-control" onchange="ckValueChange()"></td></tr><tr id="2" data-attribute-attributeid="2" data-attribute-controltypeid="9" data-attribute-description="Locations receive small red box" data-attribute-title="SMALL Red Box Carton" role="row" class="odd"><td>SMALL Red Box Carton</td><td>Locations receive small red box</td>

<td><select name="productValue[1]" data-bind="value: product_1" id="product_1" class="form-control" onchange="changeValue()"><option value="">Choose Yes / No</option><option value="yes">Yes</option><option value="no">No</option></select></td></tr>

</table>


  Routing problem
Posted by: snelledre - 01-17-2019, 07:37 AM - Forum: CodeIgniter 4 Support - Replies (5)

I have a problem with the routing that's mean the delete method.

In the app/routes.php i have :

PHP Code:
$routes->resource('department'); 

The documentatie says:
PHP Code:
$routes->resource('photos');

// Equivalent to the following:
$routes->get('photos'                'Photos::index');
$routes->get('photos/new'            'Photos::new');
$routes->get('photos/(:segment)/edit''Photos::edit/$1');
$routes->get('photos/(:segment)'     'Photos::show/$1');
$routes->post('photos'               'Photos::create');
$routes->patch('photos/(:segment)'   'Photos::update/$1');
$routes->put('photos/(:segment)'     'Photos::update/$1');
$routes->delete('photos/(:segment)'  'Photos::delete/$1'); 

So if i have in my form the link to department/id like this:
PHP Code:
<?php echo form_open('department/'.$department_item['id'], 'method=delete'); ?>
    <button type="submit" class="button is-small btn-align accent-btn raised rounded btn-outlined">delete</button>
<?php echo form_close(); ?>
In the browser you see then.
Code:
<form action="http://cmms_rucphen.test/department/7" method="delete" accept-charset="utf-8">
   <button type="submit" class="button is-small btn-align accent-btn raised rounded btn-outlined">delete</button>
</form>

The link is good but when i push the button it follows not the right route.
He comes with a error but he seach for the "show"method and not the "delete" method.
In my opinion is the code alright or not?
Or is it a bug in Codeigniter 4?
If i have time tonight i will change the route to apart routes.
If that that works i will tell you.


  [split] Annoying column? CodeIgniter 3.1.9 released
Posted by: buzzlee - 01-17-2019, 12:34 AM - Forum: General Help - Replies (3)

$primary_column_has_space = "annoying column";
$value = "value of column";
$data = array("column_one"=>"value one");

$this->db->where("`".$primary_column_has_space."`", $value);
$this->db->update("annoying_table", $data);
echo $this->db->last_query();
Output : Update `annoying_table` set `column_one`='value one' where `annoying column` 'value of column';


$this->db->where("`".$primary_column_has_space."` =", $value);
$this->db->update("annoying_table", $data);
echo $this->db->last_query();
Output : Update `annoying_table` set `column_one`='value one' where `annoying` `column` = 'value of column';


$this->db->where("`".$primary_column_has_space."` = ".$value);
$this->db->update("annoying_table", $data);
echo $this->db->last_query();
Output : Update `annoying_table` set `column_one`='value one' where `annoying` `column` = 'value of column';



Codeigniter is not support for update where column name has space? any solution?


  Migrations
Posted by: snelledre - 01-16-2019, 02:32 PM - Forum: CodeIgniter 4 Support - Replies (2)

Is this a bug or not?

When i use: php spark migrate:version 20180116211000
it's executing always the first in the migration directory for instance 20180115210500_Add_Department.

When i using the sequential system it work correctly.
For instance: php spark migrate: version 007

Andre


  Guide to get rid of Mcrypt dependancy (Encrypt)
Posted by: AustinGrey - 01-16-2019, 11:33 AM - Forum: Libraries & Helpers - Replies (1)

I'm tasked with taking a codeigniter 3 application that used to be a codeigniter 2 application (is using encrypt) and used to run on PHP 5.2 and get it running on PHP 7.2

PHP 7.2 doesn't come with MCrypt anymore, and so that main blocking issue I have is that I get an error saying I need to install MCrypt, and the codeigniter documentation states I should probably just move from the Encrypt library to the Encryption library, then I can use OpenSSL.

Is there some sort of migration guide to move to Encryption? I'm not using most of the features of Encrypt (sessions are stored in the DB, not a cookie either). I just want to get off of MCrypt.


  CodeIgniter 3.1.10 Released
Posted by: jlp - 01-16-2019, 11:04 AM - Forum: News & Discussion - Replies (14)

CodeIgniter 3.1.10 was released today, with some changes and some bug fixes.

Changes: added ‘ssl_verify’ support to the ‘pdo/mysql’ Database driver; renamed Inflector Helper function 'is_countable()' to 'word_is_countable()' due to the former colliding with one introduced in PHP 7.3.0

Bug fixes: Database library, caching, forge, & mysqli driver; form validation, session & XML-RPC libraries; captcha helper

This is recommended for all users of version 3. Download v3.1.10 now, and we encourage you to read the changelog, and to check the directions for upgrading from a previous version.


  Widget
Posted by: Myster - 01-16-2019, 04:45 AM - Forum: Best Practices - Replies (1)

Hello,

For several days I have been trying to do something but I do not know where to start.

I develop several features like a forum, a guestbook, an article system, however I would like to be able to add widgets on the site, with for example the last articles, the last topics on the forum, and on all the pages of the site or on certain pages

Do you have an idea ?

Thank you and sorry for my english, I'm french ..


  How can i update CI 4.0.0 to CI4.0.0-alpha 4?
Posted by: tebogosebake - 01-16-2019, 12:00 AM - Forum: CodeIgniter 4 Discussion - Replies (2)

I have developed a system in CI4.0.0  i want to upgrade form CI4 to latest release which is CI4.0.0-alpha4. How can i achieve that as i have never upgrade CI framework before?


  [split] RESTful ... CodeIgniter 4.0.0 Alpha.4 released
Posted by: indrandr7 - 01-14-2019, 08:52 AM - Forum: CodeIgniter 4 Feature Requests - Replies (5)

Good news, exactly. But, is there a plan for restful plugin/library as default on CI?


  Database wont connect
Posted by: chung1412 - 01-14-2019, 06:55 AM - Forum: Installation & Setup - Replies (3)

Good day codeigniter forum,

I just changed to MAC environment and whenever I load the codeigniter index page , I will have error connecting to localhost.

Severity: Warning
Message: mysqli::real_connect(): (HY000/2002): Connection refused
Filename: mysqli/mysqli_driver.php
Line Number: 201

Does anyone know how to solve this issue?

On window environment, I can set this up in ease. All i need to do is to input the correct info at the database.php file.

But on my mac environment, my XAMPP could not load localhost/dashboard , instead I need to add in the port number localhost:8080/dashboard in order to load that particular page.



  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.