Forum father modules display and deletion
How to increase the quality of user experience in processing the data queried from the database?
In fact, the data queried from database need to be processed and transfer to the common type which
can be accepted easily by users. Firstly, use html delimiter [dɪ'lɪmɪtɚ] 定界符 "<<<A” to assign html code to a variable
and echo the variable. This way is better for printing html code and do not need to use escape function.
And the php code also can be written in the html code.
Secondly, we need to replace the fixed value with dynamic data from database. For example,
There are many different module names in the system and each module have different id.
So we should use variable(array,object) to replace the fixed value.
How to delete a father_module and how to increase the quality of user experience
in deleting father_module from database?
The function of deleting the father module can be realized by a php file which we can use the SQL
deletion statement to finish the task. As we know, each father module has the special id, so we can
transfer the id from father_module.php to the father_module_delete.php through the method of “GET”.
The process is that add “?id” as a sender behind the php file father_module_delete.php, and use
variable “$_GET” as a receiver to receive the data in file father_module_delete.php.
At last, process the id by SQL statement.
- Give a prompt for users whether they decide to delete the father module or not when they click the delete button.
- The page need to return to the previous page after finishing the task of deletion.
- Prompt users when incorrect operation was executed.
Brief summary on data transmission type:
So far, the data queried from database is in the type of array. The data are stored as the type of array
when we store data into database table. They are stored as the type of associative array in database
not like the indexed array in other programming language. So they are all shown as the associative array
when we var_dump the data from database or $_GET the data.