Loading...
 
Gmail / Facebook Style Chat Application


Posted: Tuesday 5th of March 2013

Send Friend Request, Accept or Decline Request using Ajax, Jquery and PHP



This tutorial teaches you how to build a system whereby the users in your system can send friend request to other users in the system, those users who have been sent friend request have the options to accept or decline request sent to them depending on their choice of action using Ajax, Jquery and PHP.

This system works with MySql database and comprises of three tables.

The first table is where the details of the users in the system are stored and retrieved during Sign-up and Login process.
The second table is where the details of the users who are confirmed as friends are stored for friendship purpose.
The third table is where the details of every sent friend request are stored waiting for an acceptance or rejection by the user who the request was sent.

When a user sends a friend request by clicking on the Add as Friend button, this button will automatically change to Request Sent on successful sending of the request with an option to Cancel the sent request in case the user who sent the request wishes to stop the request.

Once a user who has been sent a friend request logs into the system or accesses the system, a notification for the request will be shown to this user from the top of the page with options to Accept the sent request or Decline the request depending on the user's choice of action.

If the user who has been sent a friend request chooses to accept the request, the request will be deleted from the Friends Request table and be stored in the Confirmed Friends table and both the user who sent the request and the user who the request was sent to will now see each other in their friends list.

If a user who has been sent a friend request chooses to decline the request, the request will be deleted from the Friends Request table and that ends the story. No further action is or will be taken.

This is a very simple to understand application that gives you the basics of how to implement this kind of systems with good programming code comments to ease usability.

To install the system on your server, please download the zipped folder containing the required files, extract it to your system then, open the file named README.txt and follow the three steps instructions given in that file.

To see the script in action, please click on the demo button below and download if you like what you see.







That's it guys...


Views Today: 5
Total Views: 2176

Comments
0
OUR OBJECTIVE

Our objective is to reach a place where our services will be highly regarded by businesses from various industrial domains for building their innovative busines solutions with our cutting-edge technological expertise, interactive designs and uncompromised quality.

OUR MISSION

We aspire to help businesses ranging from startups to enterprises, who reach out to us with their requirements, in achieving great lengths, expanding their reach, upscaling their products, and generate a large user-base with our outstanding and cost-effective services.

Copyright © 2011 - 2024 | All Rights Reserved