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

Chapter 09: PHP Percolate! Season 6

Gene B.
babong
Boston, MA
Post #: 2,373


Welcome to the Chapter 9 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
David P.
Dukie
Boston, MA
Post #: 75
@Gene....chp9...complete....E­xciting chapter...I have not been able to connect my web pages to MySql running on my desktop...(using 2 seperate machines)...still working on this part...I may have to install MySql on my server(trying to shy away from that right now)....Time again for a CSS3 Coffee Break

Many Thanks
Mike M.
SeabrookMLM
Seabrook, NH
Post #: 74
Hi Gene. Here are the chapter nine exercises and review with all of the pieces hopefully working. Thanks!
Gene B.
babong
Boston, MA
Post #: 2,378
@Mike - Glad to see you convinced several Rad Sox to become Percolators! When their careers are over they can settle in to making some real money.
Ken H.
Ken_H.
Boston, MA
Post #: 85
Hello fellow percolators!

I just posted the exercises for Chapter 09 in the Chapter 9 section on my site.

Most of the work was pretty straightforward application of the MySQL operations that we covered in the preceding chapters. There was something that was perhaps an error in the book, but I might have missed some small detail along the way. The information about the 'sitename.users' table that is described in the sidebar "Modifying register.php" on pg. 291 discusses the UNIQUE index on the email column in that table. My database does not have a UNIQUE index - that might be what I missed, but it doesn't seem to be set up that way in the sql.sql file that Larry provided. I posted a note to Larry's Errata page about this. I initially started looking at this in more detail when I found that I could make duplicate entries in the database, rather, entries with the same email address, and then had difficulty changing the password. So it's something to watch out for. I changed the 'register.php' module in my site to look for a pre-existing user with the same email address as that being registered in the new user registration attempt.

I made a change to the 'password.php' module that is posted on my site to extend the idea that Larry discussed in the tip on page 297 for the case where there was no update made to the database because the new password matches the currently existing password. It took a bit of rework of the handling of the update return values and error reporting to make that appear as an error and repost the filled in form as it does for other errors that are checked prior to any database queries. It seems to work.

And it was a little challenging to make the script be compatible with the environment on my local machine and with my webhost. I used Larry's advice about moving the database connection information outside of the web root directory, so there were a few games to be played there. It seems to be working, though...

Take care - have a great weekend everyone! (Thanks for visiting my site, especially if you find errors!)

Ken

David P.
Dukie
Boston, MA
Post #: 76
@Gene...Road Block..has been...Cleared.......webpag­es connecting to mysql(using 2 machines for this study group)...laughing...the Coffee break...helped...very excited...cool
Mike M.
SeabrookMLM
Seabrook, NH
Post #: 75
@Mike - Glad to see you convinced several Rad Sox to become Percolators! When their careers are over they can settle in to making some real money.
It certainly worked for Curt Schilling. -m
Gene B.
babong
Boston, MA
Post #: 2,388
@Ken @David -- Very good work. Very practical stuff presented here.
Larry U.
user 57195822
Boston, MA
Post #: 23
Thanks, Ken! I think I suggested adding the UNIQUE index in the advanced SQL chapter, but I could be mistaken. I'll double-check.
David P.
Dukie
Boston, MA
Post #: 80
Just made a bad error....If you are using XAMPP and you want to reinstall it...back up your MySql Databases first... I forgot to and only backed up my web pages...Result...wiped out all my database work up to ch 9...oh well good practice reworking them all.....
Powered by mvnForum

Our Sponsors

People in this
Meetup are also in:

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