You are here: Home » 2014 (page 3)

Yearly Archives: 2014

Mail in codeigniter


To use email in codeigniter, use below code, first load email library by using $this->load->library(’email’);. After it define to,from,subject and message, you can also use cc and bcc. At end use $this->email->send(); to send mail. To debug mail use echo $this->email->print_debugger(); You can set name of sender as $this->email->from(‘’, ‘Your Name’); For repply use $this->email->reply_to(‘’, ‘Your Name’); To create multiple ... Read More »

Set Time Zone in PHP

Many time we have to show date according to location in PHP, As we know at the same time when in India 11:00 AM, in Mexico City 00:30 AM. We have to use date_default_timezone_set() function to set default time zone, Here i am going to set for India. It will return current date and time according to IST. We can ... Read More »

JQuery JavaScript form validation


For JQuey java script form validation. Call a function with event onclick, on form submit. You can see it in PHP Registration Form. Use a JQuery file. If required field is blank, then its border will be red, with the help of CSS, like $(“#name”).css({“border”: “1px solid red”}); And set cursor at that filed with; Here i am also ... Read More »

PHP Registration Form

Step 1 create a html registration form. Simple php registration for, just copy below code and paste it into body part of a php page. In above code, i am calling a function validate(), for validation. Step 2 we use java script form validation. Use below code and paste it in head part of a php page. Step 3 Create ... Read More »

Export Data In Excel In PHP

To export data in excel, Use below php code in your data which you want to export to excel. When you can export dynamic data in php mysql, just create a simple page in which show fatch data and just put. Below code. Read More »

Email with attachment

To create mail with attachment, First you have to upload file. and you have to define file path of your site or if you want to attach file from your site, you have only define file path. Use below code and define Recipient, Sender, Subject, Message. You have to define header to mail. Read More »

Scroll To Top