Hi Friends,
I use codeigniter and have an issue about SELECT MAX ... I couldnot find any solution at google search...
it looks like it returns only id :/ it's giving error for other columns of table :/
Appreciate helps, thanks!
Model:
function get_default()
{
$this->db->select_max('id');
$query = $this->db->...
I'm building a CMS on codeigniter. I'm modifying codeigniter in small ways to make it work with my ideas more seamlessly. But I wonder - are there any restrictions on how I can profit from it? I would think I could build a website with the CMS and charge for it. But what if say, later on I buy a server and set up several accounts for sev...
hi to all
Since yesterday, during my development I’m experiencing bailout or exit my dreamwever. I was wondering this because it was happen only for some php pages. I tried a lot of examined and I noticed that it may cause to the portion with the code below. I tried to remove all line with this code and it works fine. Is there any somet...
I'm new to code igniter.
I want to declare some global variables and global constants. Normally, I would put them in the includes/global.php of my own custom framework.
Where should I define globals in Code Igniter? Here's an example of the globals I want to declare:
define('USERSTAT_OFFLINE', 0);
define('USERSTAT_ONLINE', 1);
d...
i have several HTML Select dropdowns on the same page, used in slightly different contexts. they both use the same option data that is stored and echoed out of a php variable that was built from a database query.
The Problem i am running into is that one works and returns the selected value, while the other one only returns the value of...
I'm writing an admin section to a site using CodeIgniter. I am writing an Admin class that extends the Controller class, and then controllers for admin pages will extend Admin. I do this because I want the Admin class to check the user's session to make sure he is logged in -- and if not, to show the login page and abort initialization o...
how to print a document using codeigniter PHP printer option without printer dialog box?
...
Hello.
I have a div box with some images that the user can click. When the user clicks the image i want a ajax call that will provide me with the product images from that provider.
Like this:
<div id="phones" style="display:none;">
<a href="#" value=1 id=HTC class=vendorLinks>
<img src=/images/vendors/htc.png>
</a>
...
I want to load some helper in a model. How to do this? Tried to use:
${get_parent_class($this)}->load->helper ('text');
But still getting an error
Fatal error: Call to a member function helper() on a non-object
...
I hope to open the doors to discussion with this question. I am a CodeIgniter developer looking for an E-commerce solution that follows a similar MVC structure like CI. I have narrowed it down to two solutions, but maybe someone knows of something better.
Magento - really well done, but slow
Opencart - takes advantage of MVC, similar to...
I'm using the form validation library and have something like this in the view
<p>
<label for="NAME">Name <span class="required">*</span></label>
<?php echo form_error('NAME'); ?>
<br /><input id="NAME" type="text" name="NAME" class="" value="<?php echo set_value('NAME'); ?>" />
</p>
I'd like to add a class to...
I have an issue with the html-encoding in the Input library in Codeigniter.
I have a form used to edit the News in the admin side of my project. Here is the HTML code of the title of the news:
echo form_input('title',($title) ? $title : $this->input->post('title'));
When the edit page is loaded, I'm taking the news title ...
I'm running the CodeIgniter platform, which uses .htaccess to accept URLs like
http://www.mysite.com/controller/function/argument
I currently use some .htaccess rewrites, namely (simplified):
RewriteEngine On
RewriteCond %{REQUEST_URI} !^(/index\.php|/images|/assets)
RewriteRule ^(.*)$ /index.php/$1 [L]
I want to add a rewrite rule...
Hi friends,
I use codeigniter and need to display last 3 posts at footer from blog as blabla.com/blog located.
when I create a test.php file as below. it works well,
test.php
<?php
// Include Wordpress
define('WP_USE_THEMES', false);
require('./blog/wp-blog-header.php');
query_posts('showposts=3');
?>
<ul>
<?php while (have_posts...
I am considering using CodeIgniter as the framework for my next web-application. However, I already have a large number of helper classes and data structures defined. I could add them to the application's library but I have to rename a large number of files and classes' name to match the criterion
Can I just directly include files as in...
I've been wondering what's the best way to deal with exceptions on CodeIgniter. The usual way is to use triger_error() or log_message() ... however I've been wondering if there's a better way using try/catch.
Any tips or recommendations on how to implement this into CodeIgniter?
Currently I'm extending the Exceptions class, but I would...
Hi all,
I'm having (many, but for now,) one problem with a project I'm working on.
It is a PHP project run on Code Igniter
It is a Facebook app that wants to use oAuth Twitter authorization
CodeIgniter by default clears the $_GET array because it uses the URI for controlling MVC stuff. You can turn this off to access the GET array, ...
I have a controller user with a method login
For some reason, when I call:
$this->post
I get an error Undefined property: User::$post
While, this works fine:
print_r($_POST);
...
How do you set an error message for max_length and min_length rules. For instance, if I set a rule max_length[6], I'd like the error message to display
Max characters allowed: 5
...
Hi, I'm trying to develop a little base CMS with CodeIgniter for my own use on projects but got stuck on this. Also, I'm very new to CI, but got some years with ZF and OOP PHP.
First of all let me show you my file structure:
index.php (frontend bootstrap)
backend.php (backend bootstrap)
.htaccess
system ( CI core )
application
backe...