Boston PHP Message Board › Chapter 02: PHP Percolate! Season 6

Chapter 02: PHP Percolate! Season 6

Gene Babon
babong
Boston, MA
Post #: 2,227
Send an Email Post a Greeting


Welcome to the Chapter 2 discussion area for PHP Percolate! Season 6. Please read the chapter, complete the tutorials and post a link to your completed work. Then, let your fellow percolators know how you are progressing by clicking the Add a reply link.

Return to >> Master Discussion List
Peter Phelps
Peter_Phelps
Bonita Springs, FL
Post #: 9
Send an Email Post a Greeting
Gene:

Results for Chapter 2.
Trying to get to the finish line this time!!!

http://www.peterphelp...­
Gene Babon
babong
Boston, MA
Post #: 2,245
Send an Email Post a Greeting
@Peter -- Nice work showing us the way!
A former member
Post #: 58
In script 2.6, I tried generating the month pull-down menu without accessing both the keys and values, but using the same data for the option’s value and label (the name of the months), which looks like this:

// Make the months pull-down menu:
echo '<select name="month">';
foreach ($months as $value) {
echo "<option value=\"$value\">$va­lue</option>\n";
}

And it still works well. Each execution of the loop will create a line of code like <option value="January">January<­/option> instead of <option value="1">January</optio­n>

Why should we complicate it, right?
A former member
Post #: 59
In script 2.6, if you want to get the current date from the server for the $years array instead of using a certain/unchangeable/concrete value, i.e. as of 2011, to fetch with your loop iteration, you will be able to create the array for it like this:

$today = date('Y');
$tomorrow = $today + 10;
$years = range ($today, $tomorrow);


Any other suggestion will be appreciated!
Mike Murphy
SeabrookMLM
Seabrook, NH
Post #: 67
Send an Email Post a Greeting
Hi Gene. Here is an attempt at the chapter two exercises and review. To keep in practice, I completed some of the forms a second time using QuickForm2 (from the last PHP-OOP season).
Gene Babon
babong
Boston, MA
Post #: 2,253
Send an Email Post a Greeting
@Mike -- Impressive work here. You've earned the Silver Percolator for this week!
Jim Roma
dogon23
Brooklyn, NY
Post #: 5
Send an Email You are unable to greet this member
Gene Babon
babong
Boston, MA
Post #: 2,264
Send an Email Post a Greeting
@Jim -- Nice work. I'm glad to see our "out-of-towners" are taking an early lead. smile
David Petringa
Dukie
Memphis, TN
Post #: 60
Send an Email Post a Greeting
@Gene..........Ch2...complete...working on end of chapter exc....nextcool
Powered by mvnForum

Our Sponsors

People in this
Meetup are also in:

Log in

Not registered with us yet?

Sign up

Meetup members, Log in

By clicking "Sign up" or "Sign up using Facebook", you confirm that you accept our Terms of Service & Privacy Policy