codeigniter

codeigniter form validation with phone numbers

What's a good way to validate phone numbers being input in codeigniter? It's my first time writing an app, and I don't really understand regex at all... Is it easier to have three input fields for the phone number? Recommendations and explanations are welcome! Thanks! ...

HTML form input to mysql TIME

Hello, I am having an add/edit form to update and add to database, and I was not sure what the best way is to input TIME type (HH:MM:SS). Should I use multiple html text inputs for HH, MM, SS? if so, is there a function that prepares the string for database input? Basically what I'm trying to input is how many hours, minutes, seconds a...

customize Codeigniter pagination

Is there a way that I can make codeigniter only display "« Older Articles" and "Newer Articles »" instead of displaying page numbers and all the other stuff? ...

Codeignter and GD image manipulation

Hello, In codeigniter I am creating an application that allows the user to upload multiple files in one go, to this I am using this library, http://www.mitesdesign.com/blog/open-source/multi-upload-jquery-code-igniter My question is if there are multiple images that have been upload how do I define the source image in the $config, so...

How to Setup cron in Windows XP with CodeIgniter?

I am newbie. I have Windows XP and use the CodeIgniter framework. I wanted to know how to set up a cron job. ...

Do I need an ORM for simple related queries in PHP/CI?

I started my app very simply following the documentation videos for Codeigniter. I have the following tables: Account account_id name details Contact contact_id account_id name address Order order_id account_id contact_id date description Item item_id order_id description ...

Prevent direct access of downloaded file in CI

Hi .... How to prevent direct access to my download file using CodeIgniter. Supposed I stored all of my file in application/secretdirectory/file1.jpg application/secretdirectory/file2.text application/secretdirectory/file3.zip usually, I create direct link to access these files. <a href="application/secretdirectory/file3.zip" > do...

CodeIgniter URLs

Hi, Any one of you who has worked on CI knows that it uses a segmental approach for the urls, eg.: index.php/controller/function/params Let's suppose I have put in place the following URL to submit the contact us form info: index.php/contact/submit_contact Now there is one thing that seems wrong. What if a bad guy sees the source ...

CodeIgniter with Jqgrid

Hi, I've been working on jqGrid for the last 3 days. I've been able to populate the grid, but now I can't get to work the buttons/features of the jqGrid like add, edit, save or even delete a row. Any suggestion/opinions on how to do this will be really helpful. btw- I'm using codeigniter with jqGrid this is my js file $("#listFlex"...

How to Pass Variable inside DQL CodeIgniter

i got a question in DQL how to pass session User id $vars['mood'] = Doctrine_Query::create() ->select(’m.mood_name, a.id, m.account_id’) ->from(’mood m, m.account a’) ->where(’m.account_id=”7″‘) i want to show data according to current logged user. m.account_id=Current_User::user()->id; this is not working ...

Codeigniter--add "active" css class to link, how to?

What's the quickest and easiest way to add the "active" class to a link, so it can be styled? I'm developing an app in CI, and I'd like a quick easy way to do this automatically. jQuery is an option too... ...

Codeigniter--Paypal Lib--make success return private

I'm using a Paypal Lib for CI--On success, it returns to the "success" page that says "thanks!", and it adds 1 credit for the user. The problem is, the page "success" is accessable at any time. How can I make this page inaccessible, but still functional? I'm a CI noob! Thanks for the help! ...

How to add Imagick or Gmagick Library to CodeIgniter?

Hi, I am a newbie in CodeIgniter. And would like to know how am I suppose to add Imagick/Gmagick ilbrary to codeigniter, so that I can use it in my codes? Thanks in advance. ...

How to work with join data in codeigniter?

Hi, I am having a play around with codeigniter and trying to get my head around the active record system and such like. I have set up a couple of tables and am attempting to run a join on them, as such: function GetOrganisationsAndBuildingDetails() { $this->db->select('organisations.organisation_name, organisations.organisatio...

Codeigniter paypal_lib->ammount from form?

I need to get the quantity of items from a form and pass that to CI's paypal_lib auto_form: This is my controller: function auto_form() { $this->paypal_lib->add_field('business', '[email protected]'); $this->paypal_lib->add_field('return', site_url('home/success')); $this->paypal_lib->add_field('canc...

Make strtotime() generate times only in the future.

I'm trying to make a PHP script to find the next occurence of a date (say 5-1). However, if I put that into strtotime() on 5-2 it comes up with the date from this year. I simply want to make it always return the next date possible. How can I make this work? I'm using codeigniter if that helps. EDIT: Here's some code I came up with, if s...

Ajax with jquery is not working.

In view page: <script languge="javascript" type="text/javascript"> $(document).ready(function() { $('#delete').click(function(e) {; e.preventDefault(); var parent = $(this).parent(); mainParent=parent.parent(); $.ajax({ type: 'post', url: "<?= site_url('controller_Test/fnDelete') ?>", data: ...

Resize Image With Coordinate in CI

Hi ..., I’m trying implementing crop image with coordinate. but the it doesn’t success if for the coordinate. my code is : function image_thumb($image_path, $height, $width, $x=0, $y=0) { // Get the CodeIgniter super object $CI =& get_instance(); // Path to image thumbnail $image_thumb = dirname($image_path) . '/' . $he...

Which JavaScript framework have anybody used with CodeIgniter?

I've delved into Dojo Toolkit which I intend to use with CodeIgniter. ...

Why isn't CodeIgniter passing variables?

What should be happening: user navigates to URI, routes.php grabs the State and sends it to the controller, the controller returns some info from a database query. Pretty basic stuff. The problem: the URI isn't passing the variable to the controller. I'm being told Missing argument 1 for States::state_summary I can set a default f...