POST – Review
POST – Review In our PHP Forms Lesson we used the post method. This is what the pertinent line of HTML code looked like: HTML Code Excerpt: <form action=”process.php” method=”post”> <select name=”item”> … <input name=”quantity” type=”text” /> This HTML code specifies that the form data will be submitted to the “process.php” web page using the [...]
PHP – While Loop and Do While Loop Contrast
A simple example that illustrates the difference between these two loop types is a conditional statement that is always false. First the while loop: PHP Code: $cookies = 0; while($cookies > 1){ echo “Mmmmm…I love cookies! *munch munch munch*”; } Display: As you can see, this while loop’s conditional statement failed (0 is not greater [...]
PHP For Each
We have an associative array that stores the names of people in our company as the keys with the values being their age. We want to know how old everyone is at work so we use a Foreach loop to print out everyone’s name and age. PHP Code: $employeeAges; $employeeAges["Lisa"] = “28″; $employeeAges["Jack"] = “16″; [...]

