In previous post I discuss the basic and general usage of cakephp authentication. In this post I am going to code and explain how to write a simple sign up application. This article will not only cover authentication but also models, forms and view etc.
So lets get started.
First of all create a table named “user” by executing the following sql query.
CREATE TABLE 'user' (
‘id’ int(11) NOT NULL auto_increment,
‘username’ varchar(30) NOT NULL,
‘password’ varchar(30) NOT NULL,
‘email’ varchar(255) NOT NULL,
‘created’ datetime NOT NULL,
‘modified’ datetime NOT NULL,
PRIMARY KEY (’id’)
)
Now create a model in app/models with name user.php and write following code in that model.
No comments:
Post a Comment