http://MarcsComputerServices.com

PHP Class Index - If you are interested in Learning Web Development, please email Marc@MarcsComputerServices.com

    
1) Create an HTML, Hypertext Markup Language, page with an If Else Statement.  An example is given with the file, IfElse.php.  Comments start with slashes infront of them.  Remove the slashes from and add them to another line from line 5 to line 7.  Then, you can run the program  again to see different answers.
   
  2) Create an HTML page with a While Loop. An example is given with the file, WhileLoop.php.  If the condition in the while statement is true, the following statements below it are executed.  In this case, they are run 10 times.
   
3) In PHP, MySQL databases can be used to save data to tables.  First create the table.  PhpMyAdmin can be used to create the tables in a database.  It comes with the installation of MySQL.  An example is shown with the image, SampleDatabase.jpg. This table is used with my Item Listing program on http://localhost:81/wordpress/items/ItemListing.php   I'm running WordPress on my Windows 10 Laptop.  This program is also on my website, https://marcscomputerservices.com  Please let me know if you would like to run my ItemListing.php app or my Appointment Calendar App on https://marcscomputerservices.com/app/Logon.php
   
  4) To show what is possible, I included an example of inserting records into a table from a web page called Insert.php. Along with HTML, the program includes JavaScript and a Form within a Table.  It also has the MySQL statements to add the record to the table.  JavaScript is used to check  the user input to see if it is valid.  Usually, before a record is added to a table, you need to see if it is already in the table.  If it is not, it can be added with creating a duplicate record.
   
  5) Even calculus problems can be solved with PHP.  My example shows how to find the area under a curve y = x squared from 2 to 5.  It can be calculated using calculus.  Assignment one is to rewrite the C++ code as a PHP program.  The C++ program is called rect.c, and the Assignment one is found in PHPAssignment1.rtf.
   
  6) File processing: A program called SaveToFile.php reads an address table and writes it to a file called mlist.txt.  Sometimes clients want to have a backup of their tables.  This is a good way to create a backup file since it can be imported into a MySQL table using the phpMyAdmin app.
   
  7) File processing: After a file is created from a MySQL table, it can be used to recreate the same table.  ReadFromFile.php reads records from an address table and writes the data to your computer.  If you compare the file data to the address table, you can