[SOLVED]CI dbforge help

Hello all im trying to create a simple schema with dbforge but im not sure if im just not using it right or if there is something else wrong here here is my code,
            echo 'Table banned_users exists, no need to setup.';
                $feilds = array(
                            'banned_user_id'=> array(
                                            'type' =>'INT',
                                            'constraint' =>10,
                            'banned_user_slname' => array(
                                                    'type' =>'VARCHAR',

any help would be great thanks

I noticed i had a typo with "field" in the above post, fixed it still getting the same error.
here is the error im getting
Quote:A PHP Error was encountered

Severity: Notice

Message: Undefined property: Set_up::$dbforge

Filename: controllers/set_up.php

Line Number: 57

Fatal error: Call to a member function add_field() on a non-object in C:\Users\Public\xampplite\htdocs\gorilla\application\controllers\set_up.php on line 57

Have u load the forge class...

yes heres all my loaders I have active in this controller

function Setup(){

Dont think it should make a difference as everything else works just fine but i did move the applications folder outside of the system folder

Your controller is called 'set_up', but your constructor 'setup'? Don't think that is going to work...
And shouldn't it be

Good catch on that, thanks, everything seems to be working now Big Grin just need to tinker with dbforge a bit now to get past some of the errors im getting with my schema.

one other quick question,
I have a form on another site that I would like to submit data to my CI site, will the input class work with that or will i need to use $_POST, I know it seems impracticable but it is a necessity

For your site that is just another post, it doesn't matter that the form came from another site.

Note that this makes you vulnerable to CSRF (for which you should have protected your posts), take that into account. CI 2 will have CSRF protection as standard, so you might want to look into that if you don't want to run into trouble after an upgrade.

Thanks again, the reason I asked is I tried it last night and it wasn't accepting the post data from the external source, but the form I made local which was identical to the foreign form worked just fine, looks like ill have to dig in a little deeper, hadn't realized ci 2 was coming up, so ill have to do some digging on that too. To be honest I haven't done any php work in about 8 years so im playing catch up all over the board, I am glad though I stumbled along the CI framework it has some great time saving features somthing that would have probably taken me a month to do especially catching up with php 5 and mysql 5 looks like its only going to take me a week maybe 2.

A post is nothing more than a request of a URL (the form action), and some data passed to the server in the HTTP header. The server, nor CI, cares where the post originated from.

If the post from the external site doesn't work, maybe your missing some information, or the code contains extra checks that fail? Time for some debugging...

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

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