i am new to codeigniter. In Every interview all asked about hooks. i am not getting that what is hook why i have to use it ? what the benefit of it. Answer This is example link for use it hooks in codeigniter https://qasimbadami.wordpress.com/2012/05/18/codeigniter-hooks-tutorial/ Note : suppose you have big …
Tag: php
Datatables + PHP: Server-Side Processing on Multiple Tables
How can I get Datatables Server-Side Processing script to work with a custom query? I need to select columns from multiple tables and have Datatables render them. Datatables.net’s Server-Side Processing (SSP) with PHP is summarized here: https://datatables.net/examples/server_side/simple.html I found th…
Delete button with alert does not work in php
If I click the delete button, then it is asking permission from me to delete the contents but after clicking, OK contents are not deleting. In my understanding, my code can not catch the id to delete …
JSON_ENCODE can’t encode large array
I need help with encoding large array into JSON using PHP’s json_encode(). The array is from a local Database. I am using JS to parse JSON. However, the PHP script that handles array to JSON format stops if the dataset is too big. (i.e 100,000 Results). I tried to up my memory_limit to -1 and still does…
same results for php if inside foreach
My problem is that as soon as my php variable was used for the first time, the same value shows up in every loop, though it is uncorrect: As soon as I have a correct result for $goals_match > 4 the 1 shows up correctly. But in my next results no matter if wrong or right, the 1 appears again
Silverstripe: ConfirmedPasswordField not saving new password
I am trying to allow users to update their password on the front end. All the other fields update, except for this one. I’m on Silverstripe Version 3.4.0. This probably isn’t the best way to handle this: Answer Like any other good CMS, SilverStripe will not store passwords in plain text in the dat…
PHP/SQL Dynamic menu depending on different tables
I’m trying to manage a dynamic menu based on results from tables in my database. Code below is so far i have come.. But i can’t get it to display as i want to. i have 3 tables in my database looking like this. ws_categories id maincat (name of main-category) ws_subcategories id subcat (Name of sub…
WooCommerce action hooks and overriding templates
I have started to learn how to create templates with WooCommerce and I had faced with a little problem. For instance, in the php file content-single-product.php of Woocommerce plugin I have strings …
Executing bash script with PHP, and input commands
I`m trying to execute a bash script using PHP, but the problem is that the script needs to have some commands and informations inputed during the execution process. This is what I`m using The script execute OK, but I`m not able to input any option on the script. Answer shell_exec() and exec() are not able to …
Magento 2 – How to save data after the order was successfull in a custom table
First: I understand how to create a custom module within a customtable in the backend. I had already done this and it works fine and I can save some information with it in the backend. (Name: app/code/TestModule/Module) But now I try to customize the order process. I want to save some data, like the ‘od…