Answered: new variable create?

Post date: 2021-01-19 23:47:13
Views: 223

The function qa_opt() can be used for both setting and getting an option value.

qa_opt('site_titlex', 'test forum ...')  # set value
$var = qa_opt('site_titlex')             # get value

Options are stored in the database table qa_options:

MariaDB db]> describe qa_options;
+---------+----------------+------+-----+---------+-------+
| Field   | Type           | Null | Key | Default | Extra |
+---------+----------------+------+-----+---------+-------+
| title   | varchar(40)    | NO   | PRI | NULL    |       |
| content | varchar(12000) | NO   |     | NULL    |       |
+---------+----------------+------+-----+---------+-------+
2 rows in set (0.01 sec)

so you could also manually add an option to the database

INSERT INTO qa_options VALUES ('site_titlex', 'test forum ...');

and then just use qa_opt('site_titlex') in Q2A.

Please click Here to read the full story.
 
Other Top and Latest Questions:
Trading platform Webull's China ties create national security risk, congressional panel finds; stock drops 18%
Microsoft to sell $2,599 Surface Laptop Ultra containing Nvidia AI chip
Thursday's big stock stories: What’s likely to move the market in the next trading session
Trump awarding medals to Musk, Dell, Nadella and other tech execs at science summit
Scrolling alternatives for Samsung Android?
Stargate SG-1: Abyss Rewatch
Snowpiercer: Bell the Cat Rewatch
Trump says he is not keen on a deal with Iran as U.S. reportedly prepares for 'massive bombing'
Elon Musk blames Indian 'oligarchs' for stalling Starlink launch
Stock futures are little changed after S&P 500 retreats from record: Live updates