NewChk offers significant advantages when checking your $_POST variables created in your form page. Let’s take a look.


This output came from this call:

new chk($_POST);

If we wanted to check our barcode input from our form, the pre newchk method was to put an echo command in the file, something like this:

echo “the barcode: “. $_POST[‘barcode’];

Instead with one call we get back all the variables in the form. This is a significant time saving from doing it a step at a time.

Let’s go over the output.

The first line says $_POST is an array, and new chk($_POST) was called in the inventorysave.php file on line 32.

The rest of the lines show you each of the $_POST variables with the variable name on the left, and the value of the variable on the right.

With one call you can check your entire form, and see if your form data made it to your controller.