Home | About | Web Logs | Projects

INFM 332 Web Log



INFM332 PHP and MySQL for Dynamic Web Sites-Reading Reflections


INFM332 PHP and MySQL for Dynamic Web Sites-Reading Reflections

Script 2.7 shows the use of multidimensional arrays. It first creates an array, then places those arrays inside another array. When the file executes, the first array is opened and the arrays inside are opened and echoed to the user.

Script 2.8 creates an array, then sorts it several different ways. The commands are very simplistic and straight forward. The randomizing function 'Shuffle' did not work. I am hoping we will have time in class to discuss.

Script 2.9 reworks the 'calendar.php' script by creating a loop for both the day and year.


INFM332 PHP and MySQL for Dynamic Web Sites-Reading Reflections

Script 2.5 begins by introducing simple arrays. One should make note that there are also global arrays, $_GET, $_POST, $_REQUEST, $_SERVER, $_ENV, $_SESSION, and $_COOKIE.

Script 2.6 creates and accesses arrays with dropdown menus.


INFM332 PHP and MySQL for Dynamic Web Sites-Reading Reflections

Script 2.3 introduces conditional use variables, a real step saver when repeating an entry. Also the if-then statement is used. Another conditional is called 'switch', very similar to the case statement in programming.

Script 2.4 performs some error trapping routines, very good when a user forgets to enter some data.


INFM332 PHP and MySQL for Dynamic Web Sites-Reading Reflections

Script 1.6 I am having a little trouble understanding the difference between single and double quotes. Seems the single quote is used with creating the variables and the double quote is used when printing the values. The use of < em > is interesting and I would like to know where I can find more of the html formatting.

Script 1.7 concatenating springs is common in programming and in html it uses a '.' rather than an '&' between strings. The internet site www.php.net/manual lists all features and functions of php.

Script 1.8 uses basic arithmetic functions to compute a value, similar to most programming languages. Also the use of $total += ($total * $taxrate) rather than $total = $total + ($total * $taxrate) makes for a more effient code.

Script 1.9 has constants in a format similar to most programming and seems pretty straight forward.

Script 1.10 helps with the trouble I was having with the differences between single and double quotes.

Debugging code can be a daunting task sometimes, but with good documentation and error trapping, it can be made simple. The author points out several things to check beyond the obvious coding issues, like the PHP version, using URL when running phph scripts, and following the error information. Last and not least, take a break, walk away from the computer from time to time and relax.

Finally getting to see how to move data between pages. Form, Action, and Method are key parts to remember; also the advantages of using Post, rather than Get.

Script 2.1 uses radio buttons, pulldowns, and text blocks in forms.

Script 2.2 sends the information from script 2.1 to a form that handles the information and displays the results.


INFM332 PHP and MySQL for Dynamic Web Sites-Reading Reflections

At first reading, the syntax seems a little itimidating. Not really sure why there is a need for the lengthy Line 1.

Script 1.1 is all transitional information that seems to give the page the ability to have the correct format to be viewed on the internet. I find using DreamWeaver (DW) a little annoying since I do not have a copy on my personal computer and it also seems to have several little features that do not give me the results I expect. I had been using MS Notepad for all my htm coding in the past and read recently to be careful doing so because there are some pitfalls to be discovered later. So I searched the internet and found a free html editor very similar to that which I was accustom (Notepad++ v7.5.1). I chose the 32-bit version based on the recommendation of the developers since the 64-bit version did not offer all the features of the 32-bit version. It took a little time getting use to the different format, but it has been helpful when opening and closing html tags.

Script 1.2 was a good test of the functionality of Notepad++. I will try to incorporate new ideas I learn moving forward (not changing the ones already made so the changes can be seen in a progression later).

Script 1.3 is where I had to start using the informatics.mercer.edu site for testing the functionality of the pages I was writing. I loaded the PHP and supporting software on my PC, but got a couple of error messages the first time running it. I decided since the instructor needed to see the results, it would be better to do all testing on Mercer's server. I had no errors with the first couple of tests and with a little practice, I was able to unload the pages very quickly (one noted drawback to this is if the server is not accepting connections-which has happened a couple of times).

Script 1.4 it will take some getting use to the different formats for notations in PHP.

Script 1.5 although I will most likely forget this scripts information, I find it useful for future applications. Surprisingly this script worked well on my PC before I loaded it to the school's server.