Session – PHP Advanced
It is a way to store data for users against a session ID. Web Server has no idea who you are, has no idea whether you are logged in or you have the permissions to check this page because HTTP address…
Learn PHP tutorial for beginners and professionals. Examples of file, session, date, array, form, functions, time, XML, ajax, MySQL and more.
It is a way to store data for users against a session ID. Web Server has no idea who you are, has no idea whether you are logged in or you have the permissions to check this page because HTTP address…
Its a small file that server insert on user’s computer. When the same computer requests a page with a browser, it will send cookie too. You can create and retrieve cookie values here in PHP. Create Cookies setcookie() function is…
It’s easy to upload your files to server but with ease it comes danger so be careful when allowing file uploads. Set Up “php.ini” File Search for file_uploads directive in your “php.ini” File and make it On : file_uploads =…
Create File – fopen( ) fopen( ) function is also used to create a file. In PHP, by same function to open file, a file is also created using that same function. It creates new file, given that file is…
File Handling is the most important part of web application. For different task you need to open and process a file. Manipulating Files : Creating, Reading, Uploading, and Editing files has several functions for PHP. If you do something wrong,…
In PHP: before the server executes, it is possible to insert files of one PHP file into another PHP file with help of include or require statement. Include and Require statements are identical, except upon failure: Only warning is produced…
Variables are the storage of different types of information. You cannot start with a number while declaring a variable and it starts with ‘$’ sign followed by variable name (for ex. $code). It can only contain underscore and alpha numeric…
Loop is used whenever you want a code to run over and over again in row. We use Loop instead of adding almost same codes many times. Loop Statements : Loop continues as long as the condition is true –…
If…Else..ElseIf Statement is used when you want to perform different conditions in a program. If one condition is true another is also true – If Statement If one condition is true and another is false – If..else Statement If more…
In PHP to format a date or a time, ‘date( )’ function is used. This function makes time and date easy to read. Commonly used characters for dates : d, m, y, l (small L). Here, ‘d’ represents day, ‘m’ represents…
Here, In this simple form validation “Name”, “E-mail”, “Subject”, “Feedback” and “Gender” fields are required. These fields cannot be empty (error message is displayed if left empty). It must be filled out in the HTML form. For this validation, Variables – $nameErr,…