484 Topics
| |
I'm creating a chat system and the problem is that when testing with two users, the secound user (entering the system) can see the first user (already loged in), but the first user will never see the next user(s) entering the system. I know that the problem comes from the … | |
| Hi friends, I'm wondering what is the best way to go about validating my forms with both php and ajax. For example, I want to use the form_validation library but also jquery such that the page doesn't require a refresh or redirect. How best to do this what is best … |
| Hey guys, just wondering what is the best practice to do mysql queries in CI. Do I need to escape the query using db->query->escape? Additionally, outputing stuff from the db so it doesn't break my html form what's the difference between using xss_escape and using php's htmlentities() functions. Thanks in … |
| As title states, I need help using both query strings and segment urls. Any ideas I'm at a loss? |
i have created a codeigniter application and when i tried to access it locally, it says "No direct script access allowed". i don't know what's the problem .i'm using ubuntu . i need some help with this :) | |
A Database Error Occurred Unable to connect to your database server using the provided settings. the above error am getting when i load the localhost and my database.php and db_driver codings are given below $db['default']['hostname'] = "etc.com"; $db['default']['username'] = "etc"; $db['default']['password'] = "etc@etc"; $db['default']['database'] = "visiting_link"; $db['default']['dbdriver'] = "mysql"; $db['default']['dbprefix'] … | |
I have fields in a table that are being constantly updated with the current time (each second). First, the controller calls a function to create the record in the database public function saveEntry($theuser='') { $data = array( 'theuser' => $theuser , 'dateentered' => date('Y-m-d') , //date('d-m-Y H:i:s') , 'gname' => … | |
Hello! I'm needing some help integrating HighCharts into my CodeIgniter application and getting data from my MySQL database! I've followed a YouTube video on actually integrating HighCharts and it was extremely straightforward. However, that method included a hardcoded array and I'm needing to generate an array from data stored in … | |
Hello Every one i have samll Problem Here iam using codegniter and i have template that i use in all my views in some page i afound that i can use grocery crud as it will make it easer to show and it will give better look , as iam … | |
I'm creating a chat system and I need to remove every user that did not properly logout (if for instance the computer was shutdown unexpectedly,...), such as some other tasks. One possibility is for each user's script check for inactivity (3 seconds, for instance) of every other user, but if … | |
I have created a login page using CodeIgniter 1.7. its code is shown below: <?php class login extends Controller { function login() { parent::Controller(); } function index() { $this->load->view('loginview'); } function verify() { if ($this->input->post('username')){ $uname = $this->input->post('username'); $upass = $this->input->post('password'); $result=$this->dblogin->verifyUser($uname,$upass); if($result){ redirect('dashboards','refresh'); }} } } /* End of … | |
<?php class Jcart { public $config = array(); private $items = array(); private $names = array(); private $prices = array(); private $qtys = array(); private $urls = array(); private $subtotal = 0; private $itemCount = 0; function __construct() { // Get $config array include_once('config-loader.php'); $this->config = $config; } /** * … | |
I'm creating a chat system using Codeigniter and I need to update a textarea with a field in the database each second. For that I'm trying to use jquery for the timer but I don't know how I can update the textarea with data from the database, with a call … | |
Hello, Rather then retyping the question, perhaps I can just place the link: http://ellislab.com/forums/viewthread/238828/ I already posted the question in CI forum, yet still does not find the answer yet. Perhaps if anyone can help me solve this problem would be great. | |
So, i am going to be using a php framework to create a blog and i am curious to know what you guys think is the best framework. I, so far, am most satisfied with codeigniter (mostly) and zend. What do you guys think is the best and tell me … | |
Ive been coding in PHP for over a year now. I was thinking to learn a PHP Framework. After googling around, i found few top frameworks such as Zend, CakePHP, CodeIgniter and Symfony. Still, im not able to choose between these. Can anyone please suggest me the best one ? … | |
Hello, I am trying to understand the CI code that somebody made. I saw there are two folders: site & admin folders in CI application folder. I wonder why? Is it to separate the site and admin page? Is that possible? | |
This function always returns `FALSE`: function rank($applicant_id_number = 0) { $this->load->model('advert_model'); $application = $this->advert_model->get_applications(); // $user = $this->flexi_auth->get_user_by_identity_row_array(); $rank = 0; $sql1 = "SELECT * FROM applicant_details"; $results = $this->db->query($sql1)->result(); $sql3 = "SELECT * FROM job_advert"; $job_advert = $this->db->query($sql3)->result(); foreach ($results as $key => $applicant) { $applicant_age = $applicant->age; $applicant_id_number … | |
the following function "ranks" the applicants and writes them to the rank_results table in the database: function rank() { $rank = 0; $sql1 = "SELECT * FROM applicant_details"; $results = $this->db->query($sql1)->result(); $sql3 = "SELECT * FROM job_advert"; $job_advert = $this->db->query($sql3)->result(); foreach ($results as $applicant) { $applicant_age = $applicant->age; $applicant_id_number = … | |
Hi, Can some one tell me where I can find the function `get_user_by_identity_row_array() `in the flexi auth system? it is usauly called like : $this->data['user'] = $this->flexi_auth->get_user_by_identity_row_array(); I have looked every where, but maybe I’m missing it.. where can I find this? Thanks in advance. | |
I have the following: in my **MODEL:** function get_advert() { $sql = "SELECT * FROM job_advert"; $advert = $this->db->query($sql)->result(); return $advert; } in my **CONTROLLER:** function get_detailed_list() { $job_advert = $this->ranking_model->get_advert(); echo '<pre>'; foreach ($job_advert as $j) { $job_id = $j->advert_id; $sql = "SELECT r.rank, a.advert_id AS job_id, a.job_title, d.firstname, … | |
my goal is to list each job_title or job_id and under each job_title or job_id I want to list the candidates that qualify for that job I have this sql query: SELECT * FROM rank_results AS result WHERE result.job_id='{$job_id}' GROUP BY job_id ORDER BY rank ASC I know this is … | |
Hello, This I am trying to create an effective navigation code in CI. Let's say I have 10 shared pages that have the same navigation. Do I have to add the "## navigation link" codes over and over again (10 times ?) controllers/page.php <?php class Page extends CI_Controller { public … | |
Hello, I revised my previous discussion code by simplifying it. controllers/page.php <?php class Page extends CI_Controller { public function index() { echo "Controller loaded"; $this->load->view('homepage'); } } ?> views/homepage.php <!DOCTYPE html> <html lang="en"> <head> <link href= "<?php echo base_url('assets/css/style.css'); ?>" rel="stylesheet" type="text/css" media="screen"> </head> <body> TEST </body> </html> assets/css/style.css $('body').css('background-image', … | |
Receiving this CodeIgniter message in my error log every so often (and by every so often I mean quite often): ERROR - 2013-07-21 07:26:40 --> Severity: Notice --> unserialize() [<a href='function.unserialize'>function.unserialize</a>]: Error at offset 124 of 187 bytes /home/daniweb/httpdocs/system/libraries/Session.php 724 Could a problem unserializing() be caused by a session cookie … | |
Hi Master, I cant unlink or update my uploaded image. I can successfully upload image bt i cant use unlink function or Any body help me how can i remove / Update uploaded image. Here is my Controller: public function addProfileLogo() { $data = array(); $errors = ''; if ($_FILES['logo_image']['name'] … | |
how to create mail code when user is register then send random user name and password in CodeIgniter | |
A PHP Error was encountered Severity: Notice Message: Undefined index: id Filename: controllers/event.php Line Number: 215 function addParticipant() { $data['event_id'] = $this->input->get('id', TRUE); $event_detail = $this->EventModel->getEventDetail($this->input->get('id', TRUE)); $data['event_title'] = $event_detail[1]; $this->loadpage($data, 'people', 'Add participants | BCIPN'); } | |
Hello, I am developing a site with ci 2.1.4 I used this tutorial to create an event in google calendar: [Click Here](http://www.cecilieo.com/techblog/how-to-implement-zend-framework-with-codeigniter-on-windows/) When I change a date on the view, it calls the controller function with ajax, used to work fine, now the page just hangs and I can’t figure … | |
Hey all!! I am thinking of creating a website that may contain some buying/selling items, so I was wondering which framework is the best for shopping online. I have some experience with codeigniter, but I was using it for its MVC structure which organizes and uses files more efficently. Anyway … |
The End.