Archive | Uncategorized RSS feed for this section

Zend Framework: Sending Email with attachment in Zend Framework

5 Jul

You may have used Php for sending emails in your application. I haven’t experienced it in plain php, so I don’t know whether its easy or difficult. I, however, know that Zend Framework provide very easy way for sending emails. You can even attach files with your email with single method call.
In this article I am going to discuss how to send email with attachments. Please do tell me whether it helped you or not. Read more here.http://zendgeek.blogspot.com/2009/07/sending-email-with-attachment-in-zend.html

Zend Framework: building complete application using Zend_Session, Zend_Db and Zend_Auth

4 Jul

Sorry this blog is deprecated. you can read full article here.

http://zendgeek.blogspot.com/2009/07/zend-framework-building-complete.html

Well, I have written lots of separate article on Zend Framework. Hopefully most of folk out there searching for valuable help may have gotten some from my articles.
This time my objective is to share everything with you, from basic configuration till to building complete Zend Framework application.
This article will cover
1. How to make initial configuration.
2. How to use Zend_Auth for authentication
3. Using Zend_Session for handling sessions
4. What are models and how to create them
5. Using Zend_Db to handle backend database for storing valuable information.
And much more.
So let’s get started.
1. Creating directory structure and making initial configuration
Zend Framework is based on MVC design patterns. MVC stands for Model, View, Controller. A simple definition of MVC design pattern is to separate business logic from presentation logic.
In order to work with Zend Framework MVC design pattern, you’ll need to make necessary directory structure. There are various ways of making directory structure, I, however will use the most easier to create and understand structure.

The structure I created is.

html_root
    /application
        /controllers
            IndexController.php
        /models
            Users.php
        /forms
            LoginForm.php
        /views
            /scripts
                /dojo
                    index.phtml
    /libaray
        /Zend
/js
    /css
    /images
    /index.phtm

On the top level we have html_root directory, containing application directory, library, js, css and images. It also contain index.phtml called our bootstrap file. This file contain all our configuration code. Further more application directory contain controller, models forms and views directories. Library directory contains Zend components. Js contain all our js files, css contains css files and images contains all images used in our application.

Zend Framework: Storing session data in database using Zend_Session_SaveHandler_DbTable

3 Jul

In one of my previous post I wrote how to save session data in the database. The reason behind saving session data in database is that data become more secure and can be easily retrieved later on.

Let’s look how simple and easy it is to save session data in database using Zend_Session_SaveHandler_DbTable in Zend Framework.

Read full article here.http://zendgeek.blogspot.com/2009/07/zend-framework-storing-session-data-in.html