459 Topics

Member Avatar for
Member Avatar for iamthwee

Evening ladies and gents. Just wondering what is common practice but once a session is set I have been using a validate session in each method/function in my controller. Seems like a lot of typing... necessary ... still a lot of typing. Is this what everyone else does? Ta.

Member Avatar for cereal
0
278
Member Avatar for game4tress

I have the Ajax call listed bellow inside a jquery function, and the ajax call is not working. I've used "alert" to debug and its like the jquery function didn't even had the ajax call. Nothing inside it is processed, with no sucess and no errors. Isn't it possible to …

Member Avatar for dcdruck
0
454
Member Avatar for iamthwee

Hey guys, At the moment I have an `if == admin then show admin form` on my views. I guess it was more for the sake of convenience rather than anything else. Is it best practice to create a separate controller and view for an admin panel and place this …

Member Avatar for iamthwee
0
933
Member Avatar for davy_yg

Hello, I am trying to download my online website: [gsaconst](www.gsa-constructionspecialist.com) offline - and set it to work offline, yet I haven't been successfull. In my offline website I receive this error message: -------------------- A Database Error Occurred Unable to connect to your database server using the provided settings. Filename: C:\xampp\htdocs\gsaconst\system\database\DB_driver.php …

Member Avatar for veedeoo
0
306
Member Avatar for sallaudin

class Index_model extends MY_Model { protected $user_id=array(); private $last_id; public function __construct(){ $this->load->database(); $this->_table='profiles'; } public function insert_step_1($spram) { $firt_name= $this->session->userdata('first_name'); if($first_name == '' || $last_name == '' || $relationship_to_senior == '' || $email == '' || $insurance == '' || $price_range == '' || $if_insurance == '' || $facility_placement …

Member Avatar for iamthwee
0
114
Member Avatar for game4tress

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 …

0
200
Member Avatar for iamthwee

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 …

Member Avatar for iamthwee
0
4K
Member Avatar for iamthwee

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 …

Member Avatar for veedeoo
0
245
Member Avatar for iamthwee
Member Avatar for iamthwee
0
7K
Member Avatar for archie.herbias

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 :)

Member Avatar for gabrielcastillo
0
128
Member Avatar for mohan@nano

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'] …

0
155
Member Avatar for game4tress

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' => …

Member Avatar for Tpojka
0
298
Member Avatar for Hayezb

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 …

Member Avatar for diafol
0
1K
Member Avatar for samoual

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 …

Member Avatar for cereal
0
287
Member Avatar for game4tress

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 …

Member Avatar for jkon
0
271
Member Avatar for mwenyenia07

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 …

Member Avatar for vjadeja
0
3K
Member Avatar for santoshkumar.palivela.7

<?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; } /** * …

Member Avatar for AARTI SHRIVAS
0
2K
Member Avatar for game4tress

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 …

Member Avatar for game4tress
0
2K
Member Avatar for davy_yg

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.

Member Avatar for davy_yg
0
318
Member Avatar for <M/>

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 …

Member Avatar for ashutosh08
0
206
Member Avatar for kcrazy

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 ? …

Member Avatar for jkon
0
431
Member Avatar for davy_yg

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?

Member Avatar for GliderPilot
0
580
Member Avatar for renierdbruyn

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 …

Member Avatar for broj1
0
256
Member Avatar for renierdbruyn

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 = …

Member Avatar for renierdbruyn
0
149
Member Avatar for renierdbruyn

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.

Member Avatar for minitauros
0
202
Member Avatar for renierdbruyn

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, …

Member Avatar for diafol
0
7K
Member Avatar for renierdbruyn

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 …

Member Avatar for diafol
0
204
Member Avatar for davy_yg

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 …

Member Avatar for Dani
0
324
Member Avatar for davy_yg

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', …

Member Avatar for davy_yg
0
574
Member Avatar for Dani

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 …

Member Avatar for Dani
0
872

The End.