icon for lab

CT310

Recitation 9 - FuelPHP: Forms

In this recitation, we will:


Allows users to input information for webpage to process

Login screens, job applications, online quizzes, etc.

Fuel provides us a great method making them!

We will explore and re-create this example

  1. Model
  2. Create a file called 'form.php' in the Model folder

    This class will handle file I/O

  3. View
  4. Create two View files called 'add.php' and 'list.php'

    These files will add a new line into your CSV file and display the contents of it, respectively

    Alternatively you can make one View file to print out the Form and list, but that's up to you!

  5. Controller
  6. Inside your 'home.php' file, create three methods: 'action_list', 'get_add', and 'post_add'.