codeigniter-3

How to display the last field which is user selected from form builder with the field name and field type?

自作多情 提交于 2019-12-01 13:49:09
问题 I am making the form builder and I have an input field which is called as Firstname, Lastname, Email, Iagree. Whatever user choose the field from the form builder page, all the elements will store in the database after clicking on a button. Like I choose elements Firstname, Lastname, Email and iagree from my form builder page and saved it. In the database, it will store like below example Now I update the form builder and I change the form elements. It's displaying like below image. Using

Combine array with same element value and keep them all together, comma separated

橙三吉。 提交于 2019-12-01 13:11:45
I have a Multi-dimensional array [0] => Array ( [name] => Size [value] => XS,S,XL ) [1] => Array ( [name] => Brand [value] => Adidas ) [2] => Array ( [name] => Size [value] => XS,XL,L,M ) [3] => Array ( [name] => Brand [value] => Nike ) i want result as [0] => Array ( [name] => Size [value] => S,M,L,XS,XL ) [1] => Array ( [name] => Brand [value] => Adidas,Nike ) I'm trying to array_combine , array_merge and even array_unique with no success You can try this - $array = array( '0' => array ( 'name' => 'Size', 'value' => 'XS,S,XL', ), '1' => array ( 'name' => 'Brand', 'value' => 'Adidas', ), '2'

Codeigniter 3 send email without smtp

耗尽温柔 提交于 2019-12-01 10:59:52
I am not receiving an email, though everything seems fine. May be hosting issue? Any suggestion will be appreciated. Here is my code $this->load->library('email'); $this->email->from('info@domain.com', 'Name'); $this->email->to($seller_email); $this->email->subject('This is subject'); $this->email->message('This is message!'); $this->email->send(); echo $this->email->print_debugger(); print_debugger function returns empty. Let me know you guys comments. Perfect solution is as below: Step 1: Download PhpMailer for CodeIgniter from below link. https://github.com/ivantcholakov/codeigniter

Codeigniter 3 send email without smtp

对着背影说爱祢 提交于 2019-12-01 08:44:00
问题 I am not receiving an email, though everything seems fine. May be hosting issue? Any suggestion will be appreciated. Here is my code $this->load->library('email'); $this->email->from('info@domain.com', 'Name'); $this->email->to($seller_email); $this->email->subject('This is subject'); $this->email->message('This is message!'); $this->email->send(); echo $this->email->print_debugger(); print_debugger function returns empty. Let me know you guys comments. 回答1: Perfect solution is as below: Step

How to load CS, JS dynamically in CodeIgniter?

那年仲夏 提交于 2019-12-01 00:16:18
I have different CSS and JS files related to different views. How to load CSS and JS conditionally or dynamically according to views so that only the respective JS or CSS loads to the browser? putranoval It's simple. Just create condition on your function. Then send your CSS or JS file location to view. Controller: public function index() { // conditional if (your condition) { $this->data = array( 'css' => site_url() . "your css file", 'js' => site_url() . "your js file" ); } else { $this->data = array( 'css' => site_url() . "your other css file", 'js' => site_url() . "your other js file" ); }

codeigniter 3.0 custom 404 not found error page

人走茶凉 提交于 2019-11-30 20:28:31
My problem is about custom error pages after upgrading to Codeigniter 3.0. I used to have a Errors controller which handled 404 error page of the website - on this controller I have customized some parts of page, such as if user is logged in, it was showing username on the navigation bar and etc. (yes, on 404 error page) . After upgrading to CI 3.0, I have noticed that error pages are handled in different folder , I started to migrate to this way; but the problem is I can't load any variables to this page, such as session variables or can't even use any CI's functions on these pages. I think

How to upload multiple files in codeigniter 3.0.1

二次信任 提交于 2019-11-30 08:27:14
问题 How to upload multiple files in codeigniter 3.0.1. There are similar issues and solutions in stackoverflow but unfortunately non of them are helping to fix the issue I am facing. This is the error message appearing You did not select a file to upload with my current code view (addGallery) <section> <h2>Add Gallery</h2> <?php echo form_open('Newsupload/gallery', ['id'=>'news', 'name'=>'news', 'method'=>'post','enctype'=>'multipart/form-data']) ?> <div class="grp width-50"> <label for="name"

Remove index.php from url in CodeIgniter 3

淺唱寂寞╮ 提交于 2019-11-30 07:32:29
I am doing a project in CodeIgniter 3. I need to remove index.php from url. For that help me to get .htaccess file for CodeIgniter 3 and also where to place this file. This is my baseurl http://cableandmedia.com/demo/ Update your htaccess file with the below code RewriteEngine On RewriteBase /demo RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php?/$1 [L] and in config file, please change base url with below code:- $root = "http://".$_SERVER['HTTP_HOST']; $root .= str_replace(basename($_SERVER['SCRIPT_NAME']),"",$_SERVER['SCRIPT_NAME']);

codeigniter 3.0 custom 404 not found error page

人盡茶涼 提交于 2019-11-30 05:20:06
问题 My problem is about custom error pages after upgrading to Codeigniter 3.0. I used to have a Errors controller which handled 404 error page of the website - on this controller I have customized some parts of page, such as if user is logged in, it was showing username on the navigation bar and etc. (yes, on 404 error page) . After upgrading to CI 3.0, I have noticed that error pages are handled in different folder, I started to migrate to this way; but the problem is I can't load any variables

Dynamic input field values are not calculating the with the right value

本小妞迷上赌 提交于 2019-11-29 16:45:38
I am using Codeignator. My HTML output which is correct for me. Now What I am doing is, the user will enter the name of the medication, no of pills and amount so that based on the amount it will calculate the price and display it. Formula is $single_price=$total_amount/$qty_number; Above image I added medication name="SIPLA", no of pills=3 and amount=30 . It will calculate it and display the single price=10.00 Everything is working perfectly til now. Let's talk about the "ADD" button. If any user wants more then one medication then he/she should click on "ADD" button and it will display the