PHP Code Examples – Producing A Receipt – Learning PHP 003b

Here we are continuing our lesson in working with text and numbers, by the production of a purchase receipt. The new concept is the “switch” statement, which (in my opinion) is easier to understand that the “if” control statement. Here it is:

Working Sample: Click Here Let me know if you have any questions.

Continue Reading

Working With Text And Numbers In PHP – Learning PHP 003

Check out the comments where I wrote some commentary regarding the task.

See This In Action

Continue Reading

PHP Comments, Tags, And Whitespace – Learning PHP 002

As PHP saw in our previous lesson, Learning PHP 001, a PHP file is basically just a text file with some tags telling the host computer what to do with the file. The host computer has to have the PHP language framework on it already, and nearly all web hosts have the PHP framework on […]

Continue Reading

Learning What Is PHP 001

Now that everyone is in quarantine because of the corona virus, you are at home and need to learn some new job skills, especially those that will help you find a remote job, or just make working at your current job remotely more realistic. I have been programming with PHP fairly regularly for a few […]

Continue Reading

PHP Web Scraping With SimpleHTMLDom

This post is going to show you how to do php web scraping using simplehtmldom. You can download simplehtmldom for free from the sourceforge website at Using the tool make scraping easier. I used it for a client of mine to scrape necessary patient billing information from a clearing house called Trizetto. The process […]

Continue Reading

China Shop Project – Reading Checkboxes And Drop Down With PHP

One of our business rules for our china shop ecommerce project, is that we can only choose one brand of china with a variety of items, so we are going to change the checkboxes for the brands of china. If you have seen other posts you probably saw the china listed with checkboxes. Instead of […]

Continue Reading

How To Handle Checkboxes In PHP On A Form

This post is going to show you how you can use PHP to handle the clicked checkboxes on you HTML form, and show you what you clicked. Here we have a screen showing all of our available china brands: If you just select “Mikasa” and “Lenox” and click “Filter”, you get this message: …it alerts […]

Continue Reading

How To Select All Checkboxes In Javascript

Javascript is type of html programming which allows you to run code on your viewer’s (client’s) computer machine. This code will show you how to use Javascript to select all the checkboxes on your html form. First, your html form has to have all the checkboxes called the same thing. They are all called the […]

Continue Reading

Return One Row With mysql_fetch_array

If there is one row returned by the query, I try to keep things easy and I use something like the example below, This method fetches by both associative & numeric array, so you can reference your field values with a number or name (row[‘name’] or row[1]) Here’s the code sample:

Here’s an example: […]

Continue Reading

Loop Multiple Rows With mysqli_fetch_assoc

If my query returns multiple rows, and I need to loop through them, I use something like this:

Here it is in action: looping.php

Continue Reading