Welcome Guest, Not a member yet? Register   Sign In
simple user list
#1

[eluser]Unknown[/eluser]
Hello,

I am new to CodeIgniter and am trying to create a very simple page which is a form that will take in 5 fields: User ID, First Name, Last Name, Middle Initial, and State. I want to be able to input information in these fields and submit them so that they are stored in a database (mysql). Also I will need to be able to have a page which shows all users and their information, along with the option to edit their information and delete the entry.

Can anyone help me out with the cimplest way of doing this? I am struggling a bit just setting the whole thing up and I figure its pretty simple for an advanced user.

Thanks in advance.
#2

[eluser]kgill[/eluser]
Have you read the user guide? That would be the place to start - what you want to do is bare bones basics. Try the video tutorials, if the creating a blog doesn't put you on the right path you might be better off paying one of us to do it. Wink
#3

[eluser]jedd[/eluser]
Hi mslazur and welcome to the CI forums.

Okay, you might want to start with your model first. I'll assume you're familiar with SQL commands(?).

You will want to create a model that looks a lot like all the basic ones in the user guide and in various screen casts. You'd have three methods to start with - one that grabs a list of users (easy), one that inserts a new row (easy) and one that updates an existing row (also easy).

You'd write your controller at the same time - with maybe three methods in there two that will correlate - list_users, modify, and add_user (say).

Pushing stuff out to your views as you start to build this going to be easy - and views are, since they're HTML, pretty easy things anyway.

I'd suggest that you might want to start by generating the necessary components - one model method, one controller method, and one view - for listing all the current users. This is probably the easiest of the three things you mentioned.
#4

[eluser]Colin Williams[/eluser]
I almost think it hurts to give a brief overview for something like this when the whole process of something so basic really, really needs to be understood. Or maybe short explanations help things click for some people.

Here's my recipe for you, mslazur.

1. Watch both video tutorials. Follow along with your own code.
2. Read the user guide. The whole thing. Recreate as many examples as you can in the time you have.
3. Skim the Blog video tutorial again. Stuff should sink in eventually.
#5

[eluser]Unknown[/eluser]
thanks for your help. I have looked over the user guides again with the blog example and I'm getting the hang of it. The clarification helped though. much appreciated
#6

[eluser]ribe[/eluser]
Try to generate CRUD app from your database table using Code Crafter.
It's great lesson for beginners.




Theme © iAndrew 2016 - Forum software by © MyBB