Jump to content

Search the Community

Showing results for tags 'codeigniter'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • Welcome to PHP Freaks
    • Announcements
    • Introductions
  • PHP Coding
    • PHP Coding Help
    • Regex Help
    • Third Party Scripts
    • FAQ/Code Snippet Repository
  • SQL / Database
    • MySQL Help
    • PostgreSQL
    • Microsoft SQL - MSSQL
    • Other RDBMS and SQL dialects
  • Client Side
    • HTML Help
    • CSS Help
    • Javascript Help
    • Other
  • Applications and Frameworks
    • Applications
    • Frameworks
    • Other Libraries
  • Web Server Administration
    • PHP Installation and Configuration
    • Linux
    • Apache HTTP Server
    • Microsoft IIS
    • Other Web Server Software
  • Other
    • Application Design
    • Other Programming Languages
    • Editor Help (PhpStorm, VS Code, etc)
    • Website Critique
    • Beta Test Your Stuff!
  • Freelance, Contracts, Employment, etc.
    • Services Offered
    • Job Offerings
  • General Discussion
    • PHPFreaks.com Website Feedback
    • Miscellaneous

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start





Website URL








Donation Link

  1. I have a query I'm using in my CodeIgniter model to fetch the count of listings of products between particular days. What this query is doing is it's taking status_from from logs where the date is during and after the selected date range and taking added_date from listings where the date falls before the from date range picked by the user and calculates it. Once it has retrieved those records, it checks the table for what variable that status holds and does a sum(case when else 0) to get the total count. function get_report(){ $sql = with Y as ( with recursive D (n, day) as ( select 1 as n, '2021-09-25' my_date union select n+1, day + interval 1 day from D where day + interval 1 day < '2021-10-15' ) select * from D ), X as ( select Y.day, l.*, (select status_from from logs where logs.refno = l.refno and logs.logtime >= Y.day order by logs.logtime limit 1) logstat from listings l, Y where l.added_date <= Y.day ), Z as ( select X.day, ifnull(X.logstat,X.status) stat_day, count(*) cnt from X group by X.day, stat_day ) select Z.day, sum(case when Z.stat_day = 'D' then Z.cnt else 0 end ) Draft, sum(case when Z.stat_day = 'A' then Z.cnt else 0 end ) Action, sum(case when Z.stat_day = 'Y' then Z.cnt else 0 end ) Publish, sum(case when Z.stat_day = 'S' then Z.cnt else 0 end ) Sold, sum(case when Z.stat_day = 'L' then Z.cnt else 0 end ) Let from Z group by Z.day order by Z.day; $query = $this->db->query($sql); return $query; } Dbfiddle: https://dbfiddle.uk/?rdbms=mysql_8.0&fiddle=6789f0517b194b09d235860dc794ea14 Now here as you can see I'm processing my calculations in the sql statement itself, but I want to do these calculations in my php side, basically iterating everytime it encounters Z.stat_day = 'D' then adding 1 to Draft column and same for the other statuses. Current View Class: <?php foreach($data_total as $row ){ $draft = $row->draft ? $row->draft : 0; $publish = $row->publish ? $row->publish : 0; $action = $row->action ? $row->action : 0; $sold = $row->sold ? $row->sold : 0; $let = $row->let ? $row->let : 0; ?> <tr> <td><?= $row->day?></td> <td><?= $draft ?></td> <td><?= $publish ?></td> <td><?= $action ?></td> <td><?= $sold ?></td> <td><?= $let ?></td> </tr> <?php } ?> Basically I want to refractor my PHP code to do the same thing the Mysql statement is doing, but keeping the query simple and all processing in the PHP side for performance reasons.
  2. Currently I have a table that displays a total count of my data values for each source. I'm getting this value after comparing 2 tables 1 is crm_leads with all my product information and 1 is crm_sources with what sources are the products related to. Now this is the output: Now as you can see the total count is shown under each header next to its source. Now these count values are inside a tags which once clicked go to viewall page. Here basically I want to show the data of the item that I had clicked. So for example, if I clicked the 163 under Hot status, it takes me to the view all page and shows me id, source, enquiry_date for all those under status Hot in a table. So basically it should detect the data for which source and which status is clicked and then accordingly make a statement like this? select * from crm_leads where lead_source = '.$source.' and lead_status = '.$status.'; Model Class: function get_statusreport($fdate='',$tdate='') { $this->db->select("l.lead_status,crm_sources.title,count(*) as leadnum,l.enquiry_date,l.sub_status"); $this->db->from($this->table_name." as l"); if($fdate !='') $this->db->where("date(l.added_date) >=",date('Y-m-d',strtotime($fdate))); if($tdate !='') $this->db->where("date(l.added_date) <=",date('Y-m-d',strtotime($tdate))); $this->db->where("lead_status <>",10); $this->db->join("crm_sources ","crm_sources.id= l.lead_source","left"); $this->db->group_by("l.lead_status,crm_sources.title"); $this->db->order_by("leadnum DESC, crm_sources.title ASC,l.lead_status ASC"); $query = $this->db->get(); $results = $query->result_array(); return $results; } Controller Class(leadstatus holds the view for my current table): public function leadstatus($slug='') { $content=''; $content['groupedleads'] = $this->leads_model->get_statusreport($fdate,$tdate); $this->load->view('crm/main',$main); $this->load->view('crm/reports/leadstatus',$content); } public function viewall($slug='') { $content=''; $this->load->view('crm/main',$main); $this->load->view('crm/reports/viewall',$content); } View class: <?php $ls_arr = array(1=>'Open',8=>'Hot',2=>'Closed',3=>'Transacted',4=>'Dead'); foreach($groupedleads as $grplead){ $statuses[] = $status = $ls_arr[$grplead["lead_status"]]; if($grplead["title"] == NULL || $grplead["title"] == '') $grplead["title"] = "Unknown"; if(isset($grplead["title"])) $titles[] = $title = $grplead["title"]; $leaddata[$status][$title] = $grplead["leadnum"]; } if(count($titles) > 0) $titles = array_unique($titles); if(count($statuses) > 0) $statuses = array_unique($statuses); ?> <table> <tr"> <th id="status">Source</th> <?php if(count($statuses) > 0) foreach($statuses as $status){ ?><th id=<?php echo $status; ?>><?php echo $status; ?></th> <?php } ?> <th>Total</th> </tr> <?php if(is_array($titles)) foreach($titles as $title){ ?> <tr> <?php $total = 0; echo "<td>".$title."</td>"; foreach ($statuses as $status) { $num = $leaddata[$status][$title]; echo "<td><a target='_blank' href='".site_url('reports/viewall')."'>".$num."</a></td>"; $total += $num; $sum[$status] += $num; } echo "<td>".$total."</td>"; $grandtotal += $total; ?> </tr> <?php } ?> </table>
  3. Currently I have 2 tables, the first table shows a count of statuses, refno. and agent_id(person in charge of the refno.) and the second table has an id and agent_name. So to refer a particular agent next to the refno. in table 1, you can reference it via the id of the agent table. Dbfiddle: https://dbfiddle.uk/?rdbms=mysql_8.0&fiddle=d0e8222a1e49774bcfbcfa30cec75732 Now I have found out that some of my listings have the agent_id as 0 and null, which doesn't have a reference in my agents table. So here I'm using COALESCE to add an extra row called Unassigned and inserting all variables with agent_id 0 or null inside this column. I've tried this same in my codeigniter model: function get_totalagentstatus(){ $this->db->select("SUM(CASE WHEN t.status = 'D' THEN 1 END) AS draft, SUM(CASE WHEN t.status = 'N' THEN 1 END) AS unpublish, SUM(CASE WHEN t.status = 'Y' THEN 1 END) AS publish, SUM(CASE WHEN t.status = 'U' THEN 1 END) AS action, SUM(CASE WHEN t.status = 'L' THEN 1 END) AS unlisted, SUM(CASE WHEN t.status = 'S' THEN 1 END) AS sold, SUM(CASE WHEN t.status = 'T' THEN 1 END) AS let, COALESCE(c.display_name,'Unassigned'), SUM(t.status = 'D') +SUM(t.status = 'N') + SUM(t.status = 'Y') + SUM(t.status = 'U') + SUM(t.status = 'L' ) + SUM(t.status = 'S' )+ SUM(t.status = 'T' ) AS total, t.agent_id, c.display_name"); $this->db->from('crm_listings t'); $this->db->join('crm_clients_users c','t.agent_id = c.id'); $this->db->where('archive="N"'); $this->db->group_by('COALESCE(c.display_name,"Unassigned")'); $results = $this->db->get(); return $results; } Controller Class: $content['total_agent_status'] = $this->leads_model->get_totalagentstatus()->result(); View Class: <?php foreach($total_agent_status as $row ){ $draft = $row->draft ? $row->draft : 0; $unpublish = $row->unpublish ? $row->unpublish : 0; $publish = $row->publish ? $row->publish : 0; $action = $row->action ? $row->action : 0; $unlisted = $row->unlisted ? $row->unlisted : 0; $sold = $row->sold ? $row->sold : 0; $let = $row->let ? $row->let : 0; $total = $row->total ? $row->total : 0; ?> <tr> <td><?= $row->display_name ?></td> <td><?= $draft ?></td> <td><?= $unpublish ?></td> <td><?= $publish ?></td> <td><?= $action ?></td> <td><?= $unlisted ?></td> <td><?= $sold ?></td> <td><?= $let ?></td> <td><?= $total ?></td> </tr> Now this returns everything except the Unassigned row which I want. I've also input this in my phpmyadmin to see the result and it does not return it there either, instead it shows the output with these headers and Unassigned is not there in any of the entries here:
  4. Currently I'm using CodeIgniter and Mysql to fetch my data. Here I'm using the following model to get a count of each status from my database: function get_total(){ $this->db->select("SUM(CASE WHEN status_to = 'Draft' THEN 1 END) AS draft, SUM(CASE WHEN status_to = 'Unpublish' THEN 1 END) AS unpublish, SUM(CASE WHEN status_to = 'Publish' THEN 1 END) AS publish, SUM(CASE WHEN status_to = 'Action' THEN 1 END) AS action, SUM(CASE WHEN status_to = 'Unlisted' THEN 1 END) AS unlisted, SUM(CASE WHEN status_to = 'Sold' THEN 1 END) AS sold, SUM(CASE WHEN status_to = 'Let' THEN 1 END) AS let"); $this->db->from('crm_logs'); $results = $this->db->get(); return $results; } Then to get this model I've used the following controller class: public function totallistings($slug='') { $fdate = $this->input->post("fdate"); $tdate = $this->input->post("tdate"); if ($fdate) { $content['fdate'] = $fdate; } else { $content['fdate'] = ''; } if ($tdate) { $content['tdate'] = $tdate; } else { $content['tdate'] = ''; } $content['data_total'] = $this->leads_model->get_total()->result(); $main['content']=$this->load->view('crm/reports/totallistings',$content,true); $this->load->view('crm/main',$main); } And this is my View class: <?php if(isset($data_sum) && count($data_sum) > 0) { foreach($data_sum as $row ){ $draft = $row->draft ? $row->draft : 0; $unpublish = $row->unpublish ? $row->unpublish : 0; $publish = $row->publish ? $row->publish : 0; $action = $row->action ? $row->action : 0; $unlisted = $row->unlisted ? $row->unlisted : 0; $sold = $row->sold ? $row->sold : 0; $let = $row->let ? $row->let : 0; ?> <tr> <td><?= $draft ?></td> <td><?= $unpublish ?></td> <td><?= $publish ?></td> <td><?= $action ?></td> <td><?= $unlisted ?></td> <td><?= $sold ?></td> <td><?= $let ?></td> </tr> <?php } } else { ?> <?php } ?> I now found out that there are more status words other than draft, publish, etc in my database. So I wanted a way to make this `<th>` and `<td>` dynamic but still having the same functionality it is currently having.
  5. Currently I'm using CodeIgniter MVC framework and Mysql to retrieve a count of data within a particular timeframe. My table data looks like this: Where there are different agents who are changing statuses in a particular timeframe. So what I want is to layout all the agents in the table and display what status change they had made in a particular timeframe. To do this I used the following model to get all the agents in the DB: function get_agent(){ $this->db->distinct(); $this->db->select("agent_id"); $this->db->from('crm_logs'); return $this->db->get(); } And this model to get a count of the status changes: function get_agentstatus($fdate,$tdate,$agent_id){ $this->db->select("SUM(CASE WHEN status_to = 'Draft' THEN 1 END) AS draft, SUM(CASE WHEN status_to = 'Unpublish' THEN 1 END) AS unpublish, SUM(CASE WHEN status_to = 'Publish' THEN 1 END) AS publish, SUM(CASE WHEN status_to = 'Action' THEN 1 END) AS action, $this->db->from('crm_logs'); $this->db->where('cast(logtime as date) BETWEEN "' . $fdate . '" AND "' . $tdate . '" AND agent_id="'.$agent_id.'"'); $results = $this->db->get(); return $results; } In my controller class I have used the following code to get the models: public function agentlistings($slug='') { $fdate = $this->input->post("fdate"); $content['tdate'] = $tdate = $this->input->post("tdate"); if(isset($fdate)){ $content['fdate'] =$fdate; }else{ $content['fdate'] = ''; } if(isset($tdate)){ $content['tdate'] =$tdate; }else{ $content['tdate'] =''; } $content['agent'] = $this->leads_model->get_agent()->result_array(); $content['agent_status'] = $this->leads_model->get_agentstatus($fdate,$tdate,$content['agent'])->result_array(); $main['content']=$this->load->view('crm/reports/agentlistings',$content,true); $this->load->view('crm/main',$main); } And the following in my View class: <table id="statustbl" class="table-fill"> <thead> <tr style="height:<?php echo $height; ?>;"> <th>Agent</th> <th>Draft</th> <th>Unpublish</th> <th>Publish</th> <th>Action</th> </tr> </thead> <tbody class="table-hover"> <?php foreach ($agent as $row) { echo '<tr><td>' .$row['agent_id']. '</td></tr>';//column names } ?> </tbody> </table> With this code I'm able to fill up all my distinct agents into the agents column, But I do not know how to show the agent_status with thier respective agent_id. I have tried SELECT SUM(CASE WHEN status_to = 'Draft' THEN 1 END) AS draft, SUM(CASE WHEN status_to = 'Unpublish' THEN 1 END) AS unpublish, SUM(CASE WHEN status_to = 'Publish' THEN 1 END) AS publish, SUM(CASE WHEN status_to = 'Action' THEN 1 END) AS action, agent_id FROM 'crm_logs' WHERE cast(logtime as date) BETWEEN "2021-09-25" AND "2021-10-01" GROUP BY agent_id to get the data in the same query, but this did not return the correct output.
  6. Hello, I'm just confuse on the way apache and iis react on codeigniter framework accessing folder. on my IIS site when I don't allow folder to be access on web.config it will automatically show codeigniter 404 page as it should be, but on apache its not, its like I have to set 404 on .htaccess by that it will show apache 404 not on framework side. How do I set that accessing not allowed folder on apache will show framework 404.
  7. Hi, I have a folder called "skeleton" which sits in the root of my website. Inside the folder is a selection of folders and files e.g. -- skeleton -- areas -- uk.html -- pages -- contact.html -- index.html -- images -- panda.jpg -- javascript -- jquery.js Using code ignitors built in zip library I have managed to successfully get zip a folder with all the child files/folders, however it is also including the root "skeleton" folder inside the zip file which i'm trying to exclude. Does anyone know if there is a way to exclude the root directory you are zipping? I have had a read of the documentation at https://ellislab.com/codeigniter/user-guide/libraries/zip.html and cannot find the answer or am simply overlooking it. My code is as follows: $this->zip->read_dir("./skeleton", false); $this->zip->archive($this->skeleton_path."remote_skeleton.zip"); Any help much appreciated. Thanks, MoFish
  8. Having problems viewing pages of my codeigniter based hospital management system. Can only view the homepage, other pages missing, really dont know how to fix it. Uploaded it with the sql on google drive. https://drive.google.com/file/d/0B2NbxciE_vU6S29hZGl5OW1QbzQ/view?usp=sharing Only page uploaded is tthe homepage as see below, rest are missing -- -- Dumping data for table `pages` -- INSERT INTO `pages` (`id`, `title`, `slug`, `parent_id`, `order`, `template`, `body`) VALUES (1, 'Home', '', 0, 1, 'homepage', '');
  9. Hi, I created the menu using Codeigniter Framework, it works great at websol.biz, unfortunately it returns <UL><LI> in each parent menu, how do I restrict Home and other buttons in a loop OR how to I program accordingly that it should not loop UL LI, tags under parent menu you can see the code samples of my practice. webpage - > websol.biz (live) <!-- Top Bar--> <div class="top"> <div class="row"> <div class="col-sm-3"> <div class="logo"> <a href="index.html"><img src="<?php echo base_url(); ?>public/images/logo.png" alt="" /> </a> </div> </div> <div class="col-sm-9"> <nav id="desktop-menu"> <ul class="sf-menu" id="navigation"> <?php foreach($content as $row) { $title = $row->menu_name; $id = $row->id; $link = $row->link_id; $id_a = $row->id_c; ?> <li <?php $method_name = $this->router->fetch_method(); if ($method_name==strtolower($title)) { echo "class=current"; } ?> ><a href="<?php echo base_url(); ?><?php echo $link; ?>"><?php echo $title; ?></a> <?php echo "<ul>"; for($i=0;$i<count($sub_menu); $i++) { $row2 = $sub_menu[$i]; $id_c = $row2->id_c; $title_c = $row2->menu_name2; $parent_num = $row2->parent_id; $anchor = $row2->link_id; //print_r($row2); //echo "<br>".$title."--id_c = ".$id_c = $row2->id_c; if(strtolower($title)==strtolower($id_c)) { ?> <li><a href="<?php echo $anchor; ?>"><?php echo $title_c; ?></a></li> <?php } else echo ""; ?> <?php } ?> </li> <?php echo "</ul>"; ?> <?php } ?> </ul> </nav> </div> </div> </div> <!-- End of Top Bar--> Database - > http://prntscr.com/7yd6xh
  10. Codeigniter POST request empty. I tried to up my website on our production server which is using IIS8, post request is empty, I've tried to break codeigniter and post is working. It is also working on our staging server which is on IIS6. Does anyone has an issue on this on Codeigniter 3.
  11. Hi, I want to capture the information below from all sessions (including buying sessions & non-buying sessions.) of a website. Please give me a suggestion that how to create a report in the backend that would allow us to pull this information for a certain time period. Information to include: IP Address Device Operating System Operating System Version Browser Browser Version Entry Page Exit Page User Agent String Thanks
  12. I have a controller(generatebill.php) where I have collected all the value from the form(normaluserview.php). I can see my value is stored. But whenever I wanted to display those values in table format in another view(invoice.php in this case), it keeps repeating. For better understanding, I have uploaded the files as well.. Please help generatebill.php invoice.php normaluserview.php
  13. I have the folder structure like: root application system assets uploads folder assets contains all css, img, and js. uploads contains user uploaded file. I set a "helper/assets_helper.php" file to define: define ('ASSETS_PATH', base_url().'assets/'); define ('UPLOAD_URL', base_url().'uploads/'); For all the css, img, and js, it works well like href="<?php echo ASSETS_PATH; ?>css/mycss.css" But when I display the uploaded images, it couldn't display image with <a href="<?php echo UPLOAD_URL;?>images/myupload01.jpg" ><img src="<?php echo UPLOAD_URL;?>images/myupload01.jpg" /></a> This uploaded image actually works fine with my localhost with the link like: http://localhost:9000/uploads/images/myupload01.jpg. But it couldn't display on my hosting server with like: http://users.mywebsite.com/uploads/images/myupload01.jpg Can anyone shed some light on it. Thanks!
  14. I am partnered with a marketing company located in downtown Chicago that is in need of a Sr. PHP Developer. This person will be designing, planning, and building complex content and data management systems from the ground up utilizing PHP technologies and frameworks. This is a permanent/direct hire opportunity. Must have experience with: CodeIgniter or Laravel frameworks GIT or SVN Front end technologies (HTML, CSS, etc.) Salary expectations: $100k - $125k (based on experiene) If interested please send resumes/inquries to Brittany Green at bgreen@awistaffing.com Please note: We do not offer sponsorship at this time (h1b, L2, etc.)
  15. How to work with frameworks ??? from where whould I start learning this topics ??
  16. I just learned about CodeIgniter. I saw one website but do not know if it does not CodeIgniter? And I want to do the same. Please help me! Are sold or code.
  17. Hi, Am working on hooks wit codeigniter, am getting an error after applying hooks like "This webpage has a redirect loop". My hooks.php file : $hook['post_controller_constructor'] = array( 'class' => 'SessionData', 'function' => 'initializeData', 'filename' => 'auth.php', 'filepath' => 'hooks', 'params' => array() ); auth.php file: <?php class SessionData{ var $CI; function __construct(){ $this->CI =& get_instance(); if(!isset($this->CI->session)) $this->CI->load->library('session'); } function initializeData() { if(!$this->CI->session->userdata('admin_id')){ redirect('admin'); } } } ?> Admin controller file: <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); class Admin extends CI_Controller { public function index() { $this->load->view('admin/login'); } I need to redirect all calls to admin log in page if the admin is not logged in. Why am getting this error? Please help. Thanks
  18. I know this question sounds a bit vague. I have not been working with php too long, maybe 6 months or so. I have worked with other programming languages and do have a good grasp of OOP. I have a few ideas for some apps I want to make, nothing that will be the next commercial hit. I just to do some php apps to get better at php. Everywhere I look some one is talking about a framework, and it looks like Codeigniter seems to be everyones fave, despite the fact that there is a good chance it will die out soon. I ended up giving Codeigniter a try and although I understand MVC, and I get OOP, and all of that, it seems there are many ways to set things up and a lot of the tutorials I tried out had different ways to do things withing Codeigniter, the problem with that is some of the stuff I learned on tutorials I could not get to work on my set up. I got frustrated and simply gave up after a while of tinkering with CI. I know there are plenty other frameworks, but I am wondering if I will truly be at a disadvantage if I just write core php with out using a framework. Thanks if advance for the input.
  19. Hi all Its my first project in CodeIgniter and I tried to make it live from local Issue is, In local server, site URI is running without index.php, but live it is giving error. e.g http://localhost/ci_basic/site/about folder name - ci_basic Controller name - site Function name - about In .htaccess file RewriteEngine On RewriteBase /ci_basic/ Now i uploaded the file in a folder named - chikabana ( folder in my root directory assigned to the chikabana.com ) In .htaccess file RewriteEngine On RewriteBase /chikabana/ I also changed the base url to - chikabana.com in config file and also removed index.php from config file. But this URL not working - http://chikabana.com/site/about this is working - http://chikabana.com/index.php/site/about Also my second question is - how i remove the controller name from url?
  20. Hi, I am just start using code igniter and i donot have much knowledge of it. I recently get a project to view built in codeigniter. i put this folder in www of wamp and start execution. first i got error related phpadmin i solved that but now i could not able to go further of this page message. "Welcome to CodeIgniter! The page you are looking at is being generated dynamically by CodeIgniter. If you would like to edit this page you'll find it located at: application/views/welcome_message.php The corresponding controller for this page is found at: application/controllers/welcome.php If you are exploring CodeIgniter for the very first time, you should start by reading the User Guide. ". I just want to know how to come out of this and start viewing my website pages. Thanks rkrathor
  21. I am using a 1.7 codeigniter and I have a problem using GET request. I use GET because I'm doing a cross browsing ajax with dataType JSONP. When doing a direct access to a method with GET paramater it says 404 error. Here's my sample http://www.site.com/class/method?callback=sample&email=example@mail.com 404 ERROR but when doing this http://www.site.com/class/method/?callback=sample&email=example@mail.com WORKING page loaded but no GET request found. I've been debugging the the framework but still can't find why the page is getting 404 when doing the first sample. By the way the CI framework was modify by someone I don't know. By the way the query string is enable already, but I don't understand the Russian language comment on top // При активации этой возможности вызов контроллеров и методов производится через QueryString (www.site.com/index.php?c=controller&m=method) $config['enable_query_strings'] = TRUE; $config['allow_get_array'] = TRUE; Can anyone help me to process a AJAX request using JSONP. Thanks
  22. Hi i am a bit of a codeigniter newbie, I need a set of values inserting to a databse table, the inputs are created via a foreach loop. <? foreach ($items as $item){echo' <div class="items-row"> <label for="name_'.$item['item_id'].'">'.$item['item_name'].'</label> <div class="item_input"><input type="text" name="quantity[]" id="'.$item['item_name'].'" value="0"></div> <input type="hidden" name="item_id" value="'.$item['item_id'].'"> <input type="hidden" name="user_id" value="'.$moving_basics_id.'"> </div>'; } ?> Each item is displayed with a Quanity toggle, and a user id and item id. How would i go about inserting each value into a database table? Thanks Adam
  23. Hello good day, I have a problem running an HTML5 mobile app. I am using Intel XDK as an IDE to build an android mobile application, on my desktop simulator of Intel XDK, AJAX call are working fine but when I to run the app on my mobile device using USB debugger ajax call is not working, it gives me an error of XMLHttpRequest cannot load https://www.site.com/index.php?mobile/loginauthenticate. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'file://' is therefore not allowed access. on my server side code I already put header('Access-Control-Allow-Origin', "*"); as it is needed to accept data from cross browsing, but still I get the same error, anyone that knows what did I done wrong ? Here's my ajax request code: var URL = 'https://www.site.com/index.php?mobile/'; $.ajax({ type:"POST", url:URL+'loginauthenticate', data:{email:email,password:password}, dataType:'json', beforeSend: function(){ $.ui.showMask('Logging in...'); } }).success(function(data){ var object = data; if(object.result === 'yes'){ $.ui.manageHistory=false; sessionToken = object.sessionToken; logged = true; localStorage.setItem('sessionToken',sessionToken); localStorage.setItem('logged',true); localStorage.setItem('email',email); $.ui.hideMask(); //$.ui.loadContent("#account_page"); processAccount(sessionToken); }else{ $.ui.hideMask(); alert(data.error); } console.log(object); }).error(function(xhr, status, error){ $.ui.hideMask(); console.log(xhr); console.log(status); console.log(xhr); }); Thanks
  24. Hi! I'm newer in codeigniter and I have searched on web an example of code captcha that works. Many examples not working, but an example maybe could work. This example is here http://runnable.com/UXb8GazDrMMiAAEA/how-to-add-a-captcha-in-codeigniter I want to use this example, but I don't know how to configure the files from application/config Could you help me? If you know an example that works you could say me the address on web. Thank you very much!
  25. Daily WALKIN... PROVAB is Hiring @ Bangalore... PHP Developers with PHP5/ Codeigniter/ Zend/ Magento/ CakePHP/ Opencart/ Prestashop (1.6 to 8Yrs)... 40 Positions... Education- Any, Please refer friends... Ramesh, 080-40593555, +91-8050006446 ramesh.provab@gmail.com PROVAB, NG Complex, 30th Cross Road, Jayanagar 4th T Block, Tilak Nagar, Bangalore
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.