Weekly Update | April 7, 2011
Lecture Notes
- Data Validation with Zend Framework
- Creating & using custom server behaviors
- Selecting & Inserting to MySQL with Zend Framework
- Zend_Auth database table authentication
- HTML5
Assignments
- Lesson 7 – Introducing the Zend Framework – read the blog entry before the textbook. We are doing things somewhat differently than the textbook because we are not using WAMP/MAMP.
- Lesson 8 – Zending EMail
- Project 5 – Re-creating the user system with Zend – this project is due April 10
This link is broken: “Lesson 7 – Introducing the Zend Framework – read the blog entry before the textbook. We are doing things somewhat differently than the textbook because we are not using WAMP/MAMP.”
Fixed the link – not sure why wordpress linkbacks aren;t working.
I found a great article on designing web site forms for eCommerce. “Fundamental Guidelines Of E-Commerce Checkout Design”, from Smashing Magazine.
http://www.smashingmagazine.com/2011/04/06/fundamental-guidelines-of-e-commerce-checkout-design/
I need to validate the ‘expiration date’ for credit cards and want the date entered as ‘mm/yy’ on my form, same as the credit card. Zend validation class DATE (self-defined) is written below, but I’m not sure if the ‘return false’ is coded correctly. Would this work or there a better way to write the validation code? I plan to drop it into a try/catch block.
$validator = new Zend_Validate_Date(array(‘format’ => ‘mm/yy’));
$validator->isValid(’04/12′); // returns true
$validator->isValid(‘April 2012′); // returns false
That looks correct, but the two last lines are demonstration. You would actually put the variable holding the user input value in place of the strings and only need one of the lines. Note that there is a credit card number validator also in Zend. Here is a good rundown of all of the validators.
I’m starting over again (!!).
Question: I am using:
$library = ‘/home/WWW_pages/jperetz/advdw/ZendFramework/library’;
but I am using my information:
$write = array(‘host’ => ‘localhost’,
‘username’ => ‘lmcbee_admin’,
‘password’ => ‘WxSg3f2B’,
‘dbname’ => ‘lmcbee’);
for the database.
Will this work?
Yes it should – your access library of the Zend framework , and even your webserver, is independent of your database server – it could even run on a different server on a different domain.
Hi,
The blog indicates we were supposed to turn in a project 5, but from last week’s class I didn’t think we were turning in anything on Chapter 7. Can you confirm? Hoping I didn’t miss a homework deadline.
Thanks,
Annette
Your class grades will be based on the highest X-2 out of the X projects for the semester. I will grade project 5 if you complete it, but it wasnt mandatory because it was so similar to Project 4.
I am still having trouble changing the username in the database to be UQ. It won’t take each time I try. Would this prevent my code from working? I think, however, that my code (library file) doesn’t actually connect to my database. A frustrating lesson in that I can’t get it to work, but I understand the concepts and didn’t find putting the pieces together too tedious. Just figuring out why it won’t execute. As per usual, I guess.