PHP step by step tutorials Archive

Day 21: login and logout functionality in PHP

Today you will see how we can use session for security purpose. In below example I have created “tbl_admin” table to store username and password inside mydb database. Below are the scripts to create table and insert record in it. create table tbl_admin (id int primary key, username varchar(45), password varchar(45)) insert into `tbl_admin` (id,username,password)

Day 22: Login and Logout Functionality With OOPs.

This article is about login and logout functionality with OOPs. There are 4 files used in this script: 1. adminCls.php Class to define member variable and functions related to Admin. 2. index.php is basically a login form, contains html and object of admin class. 3. dashboard.php it’s a secure page and available after successful login.

Day 23: Sending Emails in PHP

mail() function is use to send an email in PHP. Syntax: mail( to, subject, message, headers, parameters ); mail function requires 3 mandatory arguments and 2 optional arguments: Parameter Description to Required field. Specifies the receiver / receivers email id. subject Required field. Specifies the subject of the email. message Required. Specifies the message to