Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 

Remember me in CakePHP

Remember me is the functionality that people usually see in the sign in page of the website. What it does it keep your session continue by saving the cookies. We can save cookies and add the remember me functionality to sign in. We have ...

Login CakePHP

We can create a login function for logging in using cakePHP. The login functionality can be added using the Auth component available in the cakePHP. You do not need to create the session or check for encrypted password in the database as Au...

PHP: How to cache images in browser using php?

When there are multiple images loaded on the page, this may cause page to load slower. In order to increase the speed of the page we need to cache the images via .htaccess or php code. Now I am writing down the php code that will store images in ...

CURL: How to download file from ftp using curl?

This blog will let you download files from ftp using curl. Ftp url is given below. From this url we need to download this file filename.gz ftp://ftp.example.se/filename.gz Following is the working example: $curl = curl_init(); $file...

cakePHP model side validation

Data validation plays an important part in any of the application. It is very important to make ensure that user has input valid Fields or not. For example, passwords are at least eight characters long or more,  User Names ,emails are unique...

Associative array in PHP

The element of an Array in PHP by default are accessed by the index number i.e. the position in which the element or value is stored in the array. For example : <?php $temperature = array(10, 20, 30, 25); echo "Delhi temperature : ...

Inheritance in PHP

 Inheritance is a principle of OOP'S(Object Oriented Programming Language) in which a user can inherit all the properties of above class. The class who inherit the another class know as Child Class and the class which is being inherited ...

Adding method using CakePHP

There are different type of methods that we can use in cakePHP to add functionality. 1. constructClasses()- This method load the model required by the controller. This can be used while in the command line prompt. 2.referrer(mixed $default ...

To upload images in CakePHP

We can add the functionality of browsing images and let the user upload images of its choice to his account. For this functionality we first have to give a browse button in the registration page and then the functionality to it of adding the i...

To send email using cake email

To send the email using the CakeEmail we first need to configure the smtp configuration that is in the Config/email.php. public $smtp = array( 'transport' => 'Smtp', 'from' => array('youremailaddress@abcd.com' => 'My Site'), ...

Forgot Password And Reset Password In CakePHP

Forgot password functionality we usually on the login page of many website. It is used when we we forgot our password and want to recover it. In this blog we are going to recover it by sending an email to the registered email with user acco...

How to show uploader status bar for image uploading?

Hello Reader's if you are looking for the image uploader status then this blog is very helpful to you. The main reason why the developers are using this notifications is because for the user having the slow internet connections they don...

How to resize image using Qimage component in cakephp

For resizing image using Qimage component in cakephp first we have to  download Qimage plugin  after downloading Qimage plugin we have to put it into  App/Controller/Component . Then we have to do all this in our controller. ...

Retrieving and Set the data in cakePHP

Retrieve the data from the database. CakePHP come with the functions to get the data from the database. find: It is a multifunctional  function of all model data-retrieval function. It is used under the controller. It is used for...

How to crop image using Qimage component in cakephp

For cropping image using Qimage component in cakephp first we have to  download Qimage plugin  after downloading Qimage plugin we have to put it into  App/Controller/Component . Then we have to do all this in our controller. ...

CakePHP Controller Basic

A Controller in MVC like cakePHP is basically used to manage the logic around a single model. LIke for example if you are working on User model than  you have to have a controller for it name UsersController.php for managing the model. ...

Performing live serach using AJAX and PHP

Here in this blog i have used AJAX to search and provide result on the whenever user enter any character in the textbox. The result is coming from a PHP page. Ajax search is used for making the code easy to understand and for saving the users tim...

How to do AJAX cross domain calls ?

I was facing issue to post data by a form to foreign domain. I am aware of "AJAX cross-domain policy". So we just can't call "http://yahoo.com" over ajax http request and display the results on my page. So after researchin...

PHP CURL: How to Crawl multiples pages in a loop

How to crawl many pages at one page hit: I was facing issues for getting the data from multiple urls by loop. The problem is that in the first loop I was getting the data by function Cron, but when second page was called by Cron function then ...

how to upload a image in php?

PHP script is used in a HTML form to allow users for uploading a file from a folder or server. Whenever user do so initially the file is in the temporary directory after it will relocated into the target destination. The uploaded file could be an...

How to register new user using cakephp

For storing new user information in database, first we have to  create a new table in database which contain user name,email,password fields. The logic of the controller is written below. In below code we have create a function registrati...

How to pass array argument to bash file from php

I was facing this issue of passing the array from php to the bash file. To pass array to bash file write the following lines of code. Php Code: $array= $countries_array; // Countries array from database shell_exec('sh get_countries.sh '....

Function of login and logout in cakephp

Implementing code of login and logout in cakephp by using auth component in this process appController needs to be modified so that it uses Cake’s Auth component will work at the time of login and logout. This is where we tell the Auth comp...

How to convert shell script to php code?

My objective for posting this blog is to tell how do we convert shell scripting code to php. In some cases we need to use php code instead of executing shell script. Therefore I am writing the blog which may help someone to understand how do we c...

CRUD operations in cakephp

Let us start with the simple CRUD (Create, Read, Update and Delete) Application. Before we begin let me split the processes we are going to do this this blog into the following steps: Creating the Database Create models Create controlle...

Difference between include() and require() in php?

In order to include the content of another PHP page in the current PHP page we can use two methods provided by PHP which are: include() require() With the above two methods we can make HEADER, FOOTER, FUNCTIONS when user is working o...

__autoload function in php

A function in PHP which starts with a double underscore”__” are called magic functions in PHP. __autoload functions is used to add very large number of include statements automatically without the programmer. For instance: inc...

Magic Methods in PHP

PHP does not provide any specific definitions of the magic methods or functions. It is the programmer who actually writes the code to the functions that defines which states what the magic functions will do. But, magic functions are not directly ...

What are the benefits of Cake PHP frameworks

1.CakePhp is basically a framework which is based on MVC pattern i.e(model view controller). 2.Cakephp have built in validation. 3.Cakephp have fast and flexible php syntax with helpers. 4.Cakephp is very friendly because developer done ...

How to Create Database in cake php

CakePHP database configuration details are in a file that is located at app/Config/database.php. This database file user can edit the file in the notepad or sublime and can edit the feilds by which it will be connected to the database.Filling al...

login form in cakephp

Its really easy to create a login form by using cake php, for creating a form a user have to mention its type,action or url for pointing the form to the login() action to the controller, user would supply array like this. And for further fields t...

How to make multilanguage website in Codeigniter

Hello Reader's if you are looking to desing the multilaunge website then codeigniter offers you to do this with very easy steps. First learn what is multilanguage website.   A multilanguage website is which can run in any langauge ...

How to make dynamic session routing in PHP

Hello Reader's, if you are making the website in which you want to redirect the user on the same page after the user login. Then you can learn it from this blog.   For example if a user hit 'my profile' without making the l...

How to make Parent Child tree in PHP

Hello Reader's if your making the parent child relationship then this blog is very helpful to you. Here we are making parent child tree by using the Iteration functions. The output of this will a tree which showing the childs on branches and ...

How get only selected keys of an array using PHP

Hello Reader's, If you having a multidimensional array from which you only want a single key values column then this blog is helpful to you. Let consider a array with full of key values:-  $exArray=array( array(...

How to convert SOAP response to PHP Array?

Converting SOAP response to Array in php.   Dealing with a SOAP client response for a flight booking application or any other, This is how we get response from SOAP below: <S:Envelope xmlns:S="http://schemas.xmlsoap.org/so...

Validating Captcha code using php

Captcha verification includes: should be a combination of alphanumeric characters. should be case-sensitive fresh captcha is to be displayed whenever a webpage is refreshed. should be refreshed when user enters incorrect value. &...

Jquery Ajax exapmle in php

Here in this blog i have shown  a simple example how to use AJAX to send and retrieve data from a PHP page and then populate the result from a PHP page in a HTML element. The example here shows when I select a country a request is send to...

How to sort column by clicking on column header iin PHP

Below code will gives us a table on which when we  first time click the headers of column, it display data in ascending order.  if we click the header second time than it display values in descending  order.   <?php...

How to fetch data from database in PHP

For fetching data from database  in php, first we have to create a connection from database by using following code.   <?php $servername = "localhost"; $username = "root"; $password = "pass"; $database = "demo"; //this wi...

jquery validation method

jquery validation is a pattern of checking of input desired code user need a standard library of validation method and include the file into the same folder. it is a process of ensuring that computer input is clean and correct by using the rules ...

Difference between PHP4 and PHP5

PHP is a server side scripting language which is used to create dynamic web pages. PHP5 ia an updated version of PHP. PHP4 is no longer developed. There are some additional features in PHP5 due to which it is used widely. Some features a...

A simple registration and login form and connectivity through database in php

For Javascript validation please refer this link:  http://findnerd.com/account/#url=/list/view/Simple-Javascript-form-validation/15856/     FOR REGISTERING: Here is the code for registering the user and saving data in data. ...

Polymorphism

Polymorphism in php Implementing the polymorphism principle can be done in either of two ways, i.e., either choosing abstract classes or interfaces.   /* Program to demonstrate a polymorphism principle in php */ <?php c...

Captcha Code in php

Captcha stands for “ Completely Automated Public Turing test to tell Computers and Humans Apart”. A captcha is a small program which is used to develop a software program that can create and grade challenges most humans can pass but n...

How to insert values into database in php.

Inserting data to a database would be possible by using SQL statements, specifically the INSERT command. Data can be entered  into the database using insert query into the function, here is simple line of code that will create a database usi...

how does foreach loop exactaly work in php

The foreach function in php will be used for a easy way to iterate over the loop and it is only used in array and objects or It will give you an error when you try to use it on a variable with different data type. Syntax: foreach(array_e...

Session in php

Session is used in php to store information with the help of session variable. By creating session we can use that information across multiple pages. When we create an application we write the code, do some changes and then we close it our s...

Insert data into database from form in PHP

Below is a form which contain id field, name field, phone number filed, gender radio button and we are sending these data  by using post method. <form name="user_registration" method="post" > Name: <input type="text" name...

Different type of Session function in php

session_start(); It Start new session or resume existing session or the current one based on the session identifier passed via any request like $_get and $_post. When a session start php will call the open and read the session handlers.User can ...
1 2 4 15
Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: