Set Time Zone in PHP

phpsage.com

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

jquery_logo

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 document.regiform.name.focus(); Here i am also ... Read More »

PHP Registration Form

phpsage.com

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

phpsage.com

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

phpsage.com

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 »

Datatbase connection in php

MySQL-logo

While using in localhost leave password blank. By using Oops concept First create a class We have to create an objcet with $in = new db; to use database connection. Always first create an object then write mysql query. Read More »

Scroll To Top