O'Reilly logo

Building a Web Application with PHP and MariaDB: A Reference Guide by Sai Srinivas Sriparasa

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Viewing all registrations

In this section, we will build the screen that would retrieve all the current registrations in our course_registry database. We will begin by adding the get action to our StudentsCourses controller that will use the getStudentsCourses method provided by the StudentCourses model. Once the data is retrieved from the getStudentsCourses method, the data is forwarded to the get.php view from our get action. Let us add these methods to the existing scripts. The code in the controllers/studentsCourses.php file is as follows:

public function get(){
  $this->view->studentsCourses_data = $this->model->getStudentsCourses();
  $this->view->render('studentsCourses/get');
}

The code in the models/studentsCourses_model.php file is as follows: ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required