Project: Contacts Book In PHP & MySQL With Source Code
About Project:
We always have the need of making contact with different people in our daily life. So managing our list of contacts and address book on your device is pretty necessary. As we know almost everyone has a smartphone and the smartphone is the best device used today for managing contacts lists. But today we have come up with a new idea where we introduce you to an address book application made with PHP and MySQL that can save added address book details(contact list) and view all data saved.
Features of Contacts Book:
- New User can Register and login
- Add a new Contact
- Save the contact book (including first name, last name, email and contact number)
- View all address book (contacts).
- Save all address book (contacts) on the database.
- Delete the address book whenever required.
New User Registration: A user can signup himself to maintain his contacts book
User Login: A registered user can sign in and create his/her contacts lists.
User Profile: The user can manage his/her profile
New Contact: The user can add his/her contacts in the contactsbook.
View Contact: The user can view his/her contact
Installation Steps:
To run the project, you will need to download XAMPP or WAMP server on your PC.
Create a contactsbook folder under “C:/wamp/www/” or “C:/xampp/htdocs/” folder.
Unzip the .zip file using any zip program such as Winrar or 7Zip. After extracting, copy the project folder contents into C:/xampp/htdocs/contactsbook folder or C:/wamp/www/contactsbook .
Also, you can clone from GitHub repository to this folder
git clone https://github.com/pankajibn/contacts-book-php.git
Now Create Mysql Database. go to http://localhost/phpmyadmin
CREATE DATABASE `contactsbook`;
Now create two tables: users and contacts
CREATE TABLE `users` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`first_name` varchar(20) NOT NULL,
`last_name` varchar(20) NOT NULL,
`email` varchar(100) NOT NULL,
`password` varchar(100) NOT NULL,
`profile_img` varchar(100) DEFAULT NULL,
`is_admin` enum('1','0') NOT NULL DEFAULT '0',
`is_active` enum('1','0') NOT NULL DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=latin1;
CREATE TABLE `contacts` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`first_name` varchar(20) NOT NULL,
`last_name` varchar(20) NOT NULL,
`email` varchar(100) NOT NULL,
`phone` varchar(20) NOT NULL,
`address` varchar(255) NOT NULL,
`photo` varchar(100) NOT NULL,
`status` enum('1','0') NOT NULL DEFAULT '1',
`owner_id` int(11) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=latin1;
After you are done, open your browser and type the URL for example.
http://localhost/contactsbook
If everything is in place then you wee see the screen as below: