Implementing the read and write processes using Ext Direct
From here, we will start to implement the processing of data being written and read concerning the form that we have made this far. We'll be using Ext Direct for this as well. Before we continue with the following implementation, there are a few points that you should amend. One of those is to add an ID to a session when you log in. Let's amend this now (source file: 08_implement_read_and_write_by_ext_direct/index.php
):
.... "SELECT", " COUNT(id) as auth,", " users.id,", // <- add " users.email,", ....
Then, store the session ID:
.... $_SESSION["USERINFO"] = array( "id" => $row["id"], // <- add "email" => $row["email"], ....
Next, add session_start
to the beginning of the router being used by Ext Direct. By doing this, you should be able to access the session with the method from each class (source file: 08_implement_read_and_write_by_ext_direct/php/router.php
).
<?php session_start(); // <-- add...