Anda di halaman 1dari 3

PROJECT NAME : EVENT PLANNER APP

CLASS: CO6G-A GUIDE NAME: HITESH MHATRE SIR


GROUP MEMBERS:
1. SINGH ANUJ(48) 2. SUKUNYA VAIDYA(14)
3. SAHIL UTEKAR(2) 3. PRUTHA TANDEL(17)
Duration of Work: 22nd January 2018 – 27th January 2018 (Week 06)
Signature of Guide Total
Signature of Subject Teacher / 10

Work report of sixth week

After successfully completing with the login page of our project. I decided that now I will
make connectivity between the database MYSQL with my login page components, which
was very important since the login details need to be stored somewhere which would be
the database. But before retrieving or storing the data that would be the details of the user
there is a need to make a connectivity which I had done in this week.
Also had tracked the work progress of my team members and help them where
they need, and them on the track and tried my best that every team member of my group
has completed their task within the time as per scheduling.
So in this week I had completed task of the connection between my login
components with the database and few coding of the connection are as follows:-

$username = $_POST['email'];
$password = $_POST['password'];
$query = "select * from users where username = '$username' and pass =
'$password' and role='user'";
$result = mysql_query($query);
$userId = NULL;
$name = NULL;
$surname = NULL;
if(mysql_num_rows($result) > 0)
{
while($row = mysql_fetch_assoc($result))
{

$userId = $row['userId'];

DEPARTMENT OF COMPUTER ENGINEERING


$name = $row['name'];
$surname = $row['surname'];
}
session_start();
$_SESSION["userId"] = $userId;
$_SESSION["full_name"] = $name." ".$surname;

header("Location: index.php");
die();
s}
else
{
header("Location: login.php");
die();
}

The above code will established a connection with the database and the details of the login
page is same as stored at the time of the registration then user will get the access to book
the event as the user would be a legitimate user and the user would be proceeded to the
booking page our project.

DEPARTMENT OF COMPUTER ENGINEERING


DEPARTMENT OF COMPUTER ENGINEERING

Anda mungkin juga menyukai