PHP: Parameter HTML
There are times when we want the same thing to go out on the web, over and over - like the title of a web application. We simply make table like above, and a routine to lookup the record and have it go out.
For maintenance, one can update the table data in a database maintenance product or specialize the routine for protection, but using Phpmyadmin is "good enough" provided the person realizes what is going to happen and immediate with their change. Merely look up the record, make changes, and commit to the database!
One merely makes a record with a title and text fields as the picture below has:
Title is a nomenclature to find it via programming and Text is what goes out. Here is the programming to make it happen:
<?php
// Needed thruout the code
function LookupParameter($Title) {
?? ?DoSQL("select * from parameter where title='$Title'", "ShowParameter");
}
function ShowParameter ($row) {
? echo $row["Text"];
}
?>
I usually put this in a screens.php for inclusion as it is used quite a bit. Then when it is to be used, simply call the function as shown below:
Once it is encoded, there is one point of change, the database record, and it will be applied throughout the programming.