PHP Booosta 3 Tutorial
PHP Booosta 3 Tutorial
Working with your new files
So now we have created our files. This means that our application is
already up and running. Well in a very simple manner... but it is
working. We already can create lecturers, courses, users and we can
register users to courses. Let's do that!
Click on Lecturer in the main menu. You now see a (empty) list of existing lecturers. To create one, click on
. You now see the following form:
Fill in some data. Mention that Booosta has created a text element for
the varchar field, a date selector for the date field, a select for the
enum field and a textarea for the text field. We did not tell it to do
so, it does that by default.
When you now click "apply" you return to the previous page, but now you see a lecturer in the list:
If you click on the edit symbos (the blue pencil), you get the form for
editing the lectuerer. You also see a (empty) list of courses below.
These are all the courses that belong to this lecturer. You can add a
new course in pretty much the same way as you added the lecturer.
Before we can register users with our courses we have to create the
users. On the top of the page you see the menu "User Administration"
and inside the link "User". With this link you get the list of existing
users, which is initially empty. You can add a user in quite the
similar way like you added data before. Provide a username and password
and optionally a comment. If you then edit the user, you will see
additional elements providing privileges and roles. We do not need to
care about that right now.
Now we can try to register our new user with one of the existing
courses. For that click on "Registration" in the main menu on the left.
What we see is not exactly what we expected. We have a select with all
the courses and the possible grades. We also have a date field for the
registration date. But the select for the user to register seems to be
empty. What went wrong?
Actually nothing "went wrong". Booosta just does not know which field
of the user table it should display. When it finds a field named "name"
it chooses this field. But if this field is missing, it has no clue
what to display. If you look at the database table "user" you find out
that the field to display is "username". So we have to do some little
coding to tell Booosta to display that field.
Previous -
Next