PHP: Parameter HTML

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:

No alt text provided for this image

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:

No alt text provided for this image

Once it is encoded, there is one point of change, the database record, and it will be applied throughout the programming.

要查看或添加评论,请登录

Scott Augé的更多文章

  • Useful Tool: PHP Wiki (mediawiki)

    Useful Tool: PHP Wiki (mediawiki)

    So many times programmers (or other) want a tool that can be a quick document for work out there. Something to answer…

    1 条评论
  • Management Article: What is quality software?

    Management Article: What is quality software?

    (This is from a E-Zine for developing in Progress. URLs and such are out dated.

  • Menus And The Like On PHP Programs

    Menus And The Like On PHP Programs

    Since it is snowy out today and I have experienced four stokes so don't mind the spelling if it you see an error, I…

  • GetValue() for form/url nvp and cookies with PHP

    GetValue() for form/url nvp and cookies with PHP

    When dealing with PHP and you have Webspeed experience (https://progress.com), it might be useful to create a GetValue()…

  • PHP to 4GL/ABL

    PHP to 4GL/ABL

    Added Entry() and NumEntries() to PHP code for a string of comma delimited substrings like the ABL/4GL has. Also…

  • PHP Code and Dictionary Help Tools

    PHP Code and Dictionary Help Tools

    There are a lot of times when a form on a web app wants information already in the database. Such as the example below:…

  • Queue in PHP (Code)

    Queue in PHP (Code)

    Of course if I write about Stacks(1) (LIFO - Last In, First Out), then I got to write about Queues(1) (FIFO - First In,…

  • Simple stack in PHP (Code)

    Simple stack in PHP (Code)

    Here is a class called Stack that implements a stack. A stack is one of the basic data structures one learns in college.

  • Simple stack in PHP/Maria (Dictionary)

    Simple stack in PHP/Maria (Dictionary)

    This is a dictionary used for a simple stack code in an upcoming article. First of all, what is a stack? Well, it is…

  • HTML/JAVASCRIPT Validating Inputs (using Workbench)

    HTML/JAVASCRIPT Validating Inputs (using Workbench)

    Had a question: How do you validate inputs? (I do pay attention to my comments!) A good question (and gives me the…

社区洞察

其他会员也浏览了