You are here: Home » PHP (page 2)

Category Archives: PHP

create folder in php

When have to upload file in php after create a folder/directory, First check if folder/directory is created or not? To check it use for check any type of file use To create folder use, To give read wirtr permission use on folder To create folder use, 0777 usr for read write permission to folder. Read More »

Rename file name in PHP

When have to upload file in php, always rename file name. If your file containing special characters like #, file could not be open in browser. Some time you upload same file and not rename it, old one is replace with new. To avoid it, rename file name with time() or some unique number. Read More »

Session in PHP

Session is an information which created by server and stored at the server. To start session, use session_start() function at the top of the page, To store value in session, $_SESSION[‘id’]; srore value 1 until session not destroy. When ever we use $_SESSION[‘id’]; it’s result always be 1. Destroy session value, We can also use session_unset(); To free all session ... Read More »

date time in php

In PHP, We use date() function to display date, we have to pass parameter in date() function, according to parameter it display the result. Display Day with date() function:- d => 01 to 31 D => Mon through Sun j => 1 to 31 l => Sunday through Saturday N => 1 (for Monday) through 7 (for Sunday) S => ... 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 »

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 »

Scroll To Top