delete_word.php
\file \brief Delete a word
Call: delete_word.php?wid=[wordid]&tid=[textid]
PHP version 8.1
Tags
Table of Contents
Functions
- get_term() : string
- Return the term corresponding to the ID.
- delete_word_from_database() : string
- Edit the word from the database.
- delete_word_javascript() : void
- Do the JavaScript action for changing display of the word.
- delete_word_page_content() : void
- Make the HTML content of the page when deleting a word.
- do_delete_word() : void
- Complete workflow for deleting a word.
Functions
get_term()
Return the term corresponding to the ID.
get_term(string $wid) : string
Parameters
- $wid : string
-
ID of the word
Tags
Return values
string —A word
delete_word_from_database()
Edit the word from the database.
delete_word_from_database(string $wid) : string
Parameters
- $wid : string
-
ID of the word to delete
Tags
Return values
string —Some edit message, number of affected rows or error message
delete_word_javascript()
Do the JavaScript action for changing display of the word.
delete_word_javascript(string $wid, int $tid) : void
Parameters
- $wid : string
-
ID of the word to delete
- $tid : int
-
Text ID
delete_word_page_content()
Make the HTML content of the page when deleting a word.
delete_word_page_content(int $tid, string $wid, string $term, string $m1) : void
Parameters
- $tid : int
-
Text ID
- $wid : string
-
ID of the word to delete
- $term : string
-
The deleted word
- $m1 : string
-
Some edit message, number of affected rows or error message
do_delete_word()
Complete workflow for deleting a word.
do_delete_word(int $textid, string $wordid) : void
It edits the database, show the success message and do JavaScript action to change its display.
Parameters
- $textid : int
-
ID of the affected text
- $wordid : string
-
ID of the word to delete