Welcome Guest, Not a member yet? Register   Sign In
Using Form to Insert data into Table -- please help
#1

[eluser]JPrieto[/eluser]
I really want to use the MVC programing struction of CI

I learn best by example
thats how I learn the pagination feature
someone here was kind enough to provide code

Now ...

I would like to know if someone can provide me the code
for a very simple form to insert data into a table
which only has 3 fields

please

the idea is to use a form (using CI from validations, and strct CI form tags)
to insert data into my database table

NOTE:
each entry must be check to make sure each username field value is unique
the same for phone field -- both must be unique.


I really want to use a model to insert data into the table

here are the facts

=================================
Database = friendsdb
table name = "friends"
table fields are:
id - enumrates
username - must be unique
phone - also must be unique
notes - text

==================================

So.. if someone can provide the .....

#1
CODE FOR THE CONTROLLER (which we can call "Buddies")

#2
CODE FOR THE FORM ENTRY

#3
CODE FOR THE FORM SUCCESS PAGE

#4
CODE FOR THE MODEL


Please -- I really would be grateful

Thanks
ps: please test your code before submitting, as I will use to learn, and if there is any bug it will confuse me.


Messages In This Thread
Using Form to Insert data into Table -- please help - by El Forum - 06-05-2009, 11:26 PM
Using Form to Insert data into Table -- please help - by El Forum - 06-06-2009, 12:13 AM
Using Form to Insert data into Table -- please help - by El Forum - 06-06-2009, 12:21 AM
Using Form to Insert data into Table -- please help - by El Forum - 06-06-2009, 01:33 AM
Using Form to Insert data into Table -- please help - by El Forum - 06-06-2009, 03:24 PM
Using Form to Insert data into Table -- please help - by El Forum - 06-06-2009, 04:40 PM



Theme © iAndrew 2016 - Forum software by © MyBB