Welcome, Guest
You have to register before you can post on our site.



Search Forums

(Advanced Search)

Forum Statistics
» Members: 15,538
» Latest member: softwareinfotechs1@gmail.com
» Forum threads: 70,591
» Forum posts: 363,028

Full Statistics

Latest Threads
How block IP in PHP?
Forum: General Help
39 minutes ago
» Replies: 8   » Views: 93
How to get view into a va...
Forum: CodeIgniter 4 Support
45 minutes ago
» Replies: 0   » Views: 2
Entity fields not saving ...
Forum: CodeIgniter 4 Support
1 hour ago
» Replies: 2   » Views: 146
Implement Mpdf
Forum: CodeIgniter 4 Support
3 hours ago
» Replies: 1   » Views: 36
Upgrading and determining...
Forum: General Help
Yesterday, 03:16 PM
» Replies: 3   » Views: 47
Classmap not loaded?
Forum: Libraries & Helpers
Yesterday, 02:35 PM
» Replies: 0   » Views: 35
Supported Languages
Forum: CodeIgniter 4 Support
Yesterday, 12:22 PM
» Replies: 2   » Views: 58
Url segment in ci4
Forum: CodeIgniter 4 Discussion
Yesterday, 11:55 AM
» Replies: 4   » Views: 512
preg_match(): Compilation...
Forum: General Help
Yesterday, 11:39 AM
» Replies: 3   » Views: 33
values from checkbox
Forum: General Help
Yesterday, 09:03 AM
» Replies: 2   » Views: 46

  pb inserting date in DB with scaffolding
Posted by: El Forum - 07-03-2007, 04:31 AM - Forum: Archived Development & Programming - Replies (9)


i'm trying to insert datas into my DB table using scaffolding.
My table has the following structure :

CREATE TABLE tablename (
  id int(11) NOT NULL auto_increment,
  title varchar(255) NOT NULL default '',
  description text NOT NULL,
  url varchar(255) NOT NULL default '',
  created_on datetime NOT NULL default '0000-00-00 00:00:00',
  PRIMARY KEY  (id),
  FULLTEXT KEY title (title,description)

when i try to insert some data with scaffolding. Every thing goes fine except the date wich stays to the default value : 0000-00-00 00:00:00
I want the datetime to be inserted dynamicaly into the DB.

Do i have to modify my DB structure so it works with the scaffold ?

What have i done wrong ?

Thanks for your help !

Posted by: El Forum - 07-03-2007, 02:04 AM - Forum: Archived Development & Programming - Replies (3)


I build an login system/script that sets the session..
Now i checked some stuff and found out that if you close your browser and restart the session still exists.
I know the session is not an session in the normal php session way.

Where is this session stored? and how do I kill/destroy the session on browser close?
Would be nice when you forgot to logout the system does it for you.


I know i can set an expiration for the session in the config, but still i want to kill the session when the browser is closed.

  Dreamhost => [No input file specified]
Posted by: El Forum - 07-03-2007, 01:40 AM - Forum: Archived Development & Programming - Replies (29)

Hi Guys,

I tried uploading my system in dreamhost, and I always get "No input file specified." error/notice. Checked the config file but it was ok, I tried to upload the system in another host (my friend's), and it worked well. However since dreamhost is my main hosting I need to fix this issue.

Anybody who has encountered the same issue before? Need some help.

Thanks Smile

  Date Effective Content
Posted by: El Forum - 07-03-2007, 01:40 AM - Forum: Archived General Discussion - No Replies

Any suggestions on the best way to use CI to build websites where:

1. Content is date-effective, i.e., only displayed if active
2. "Clickable" for editing
3. Page layout & style easy to build by outsourced talent

Having date-effective content ensures time-sensitive content is displayed only when it should be. In addition, the effective date can be set in the future to review/approve, and set in the past to explore archive.

"Clickable" editing eliminates navigating an admin menu to find where to update content. Using AJAX, it's also quick.

Non-technical graphic artists will design the web page layout and styles, so selecting and placing content on a page must be super easy to learn and use.

It's clear to me that a class is needed for each content category to handle specific requirements, and a "content management (CM)" class is needed to handle all the common things such as display of only currently-effective content. The database would have a CM table with the effective begin and end dates, who inserted and edited the content and when, etc. Every content category class table would be linked to the CM table.

But I'm not sure about the best way to handle the control, model and view of the CM class and the various content category classes. (I'm new to CI, strong in PHP and Javascript.) So I'm guessing the various category controllers would extend the CM controller and inherit the CM controller's handling of, say clicking on a textarea to edit it. Or maybe a CM library of functions?

But would a CM controller function be passed all the particulars of the textarea, or would that category's controller call CM controller functions? Or perhaps functions in a CM Library?

Each category's model would join to the CM table, that's easy. But there needs to be a common place where the current effective date is accessed and a "get" function to retrieve only rows whose date range includes that date (which may not be today's date).

What about the views? Just one CM view that is passed lots of parameters, or a view for every category that whose portion of the page is included in the CM "master" view that is actually output?

And maybe I'll get lucky and someone will point me to where this problem has already been solved. :-)

  multiple query results in a view - HELP
Posted by: El Forum - 07-03-2007, 01:35 AM - Forum: Archived Development & Programming - Replies (8)

Hi all,

I need to use multiple query results in a single view. I'm quite new to CI. Appreciate some help/pointers to sample code.


  upload excel
Posted by: El Forum - 07-03-2007, 01:21 AM - Forum: Archived Development & Programming - Replies (2)

any ane can help me,
i need sample class to upload excel into mysql

  flashdata problem
Posted by: El Forum - 07-03-2007, 01:05 AM - Forum: Archived Development & Programming - Replies (5)

i have a strange problem -
im using db session and when im using the set_flashdata method i see the data only after i refresh my page twice.

for example, i use flashdata in my login form when the login falied but the flashdata is only seen on the screen in the second time the login falied.

any ideas what the problem can be or from where to start looking?

  rounding a decimal
Posted by: El Forum - 07-02-2007, 08:42 PM - Forum: Archived Development & Programming - Replies (7)

Is there any way i can round a decimal by just dropping off the last unecessary numbers wihtout rounding up or down???

3.459 to 3.45


5.999999 to 5.99


  Where's Forge?
Posted by: El Forum - 07-02-2007, 07:31 PM - Forum: Archived Development & Programming - Replies (3)

I listened to the podcast about CI this morning and the speaker mentioned Rapyd and Forge as great plug-ins for CI. I found Rapyd and I'm studying it. I thought Forge was cited as a class for creating, validating and managing forms but I can't seem to find it by searching the site.

Can someone point me to it, please?


  Validation prep_for_form
Posted by: El Forum - 07-02-2007, 06:57 PM - Forum: Archived Development & Programming - Replies (5)

[eluser]Aaron L.[/eluser]

I am trying to submit my form to a function which validates my form before inserting it into the DB. In this function, I am attempting to use prep_for_form (documentation). The problem is, when I fill-in the form with something like "I'm", I still get an SQL error because the ' is there.

Here is my code:


    //set the validation rules
    $rules['subject'] = "prep_for_form|required|xss_clean";
    $rules['message'] = "prep_for_form|required|xss_clean";
    $rules['to_nick'] = "trim|required|xss_clean";
    //set field names for validation error messages
    $fields['subject'] = 'Subject';
    $fields['message'] = 'Message';
    $fields['to_nick'] = 'To Nickname';

    if ($this->validation->run() == FALSE)
        echo "Error";
                $this->db->query("INSERT INTO messages (subject, message) VALUES ('$subject','$message')");

                echo "SUCCESS!!";

Do you know what's going on here? I'm stumped...


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.