You are on page 1of 15

Pir Mehr Ali Shah

Arid Agriculture University, Rawalpindi


Office of the controller of Examinations
Final / Fall 2020 (Paper Duration 24 hours)
To be filled by Teacher

Course No.: CS566 Course Title: WEB TECHNOLOGIES LAB


Total Marks: 20 Date of Exam: February 9, 2021
Degree: BSCS Semester: 4th Section: A
Marks
Q.No. 1 2 3 4 5 6 7 8 9 10 Obtained/
Total Marks
Marks
Obtaine
d
Total Marks in Words:
Name of the teacher: FAIZAN UL MUSTAFA
Who taught the course:Signature of teacher / Examiner:

To be filled by Student

Registration No: 19-ARID-04 Name: Ataliek Ahmed

Answer the following questions.

Q.No.1. Read the scenario carefully and Implement it by answering questions. [20 Marks]
Gujrat Institute of Management Sciences has its clear objective to Implementation of a high quality and
distinctive curriculum of (PMAS-AAUR) which supports current and future economic and cultural demands
and which offers pathways to higher studies and employment. Every Year, hundreds of students get
admission in Gujrat Institute of Management Sciences GIMS. They visit Student Service Center SSC, Get
admission form. After filling admission form candidates submit their admission form back to SSC. When
candidate submit form, they get a slip from SSC on which FORM number, serial number, and date is
mentioned. Admission Office asks students to give following information through Admission Form.
1. Personal Details
2. Academic Details
3. Desired Preferences in Program Selection.
After getting form from student the staff at SSC do initial scrutiny (Eligibility Criteria) and make the merit
according to the student credential and department policy. GIMS wants to digitalize its admission process.
The competent Authority of GIMS wants you to perform the JOB done. Keep following Points in mind and
develop the online admission system according to your own design.
Part 1)
DESIGN a Web-Page “ADMISSION.PHP” containing FORM according to following Information. [5]
PERSONAL INFORMATION
 Name
 Father Name
 CNIC
 Image
 Domicile (Drop-Down)
 Gender
 Cell number
 Email
Academic INFORMATION
 SSC and HSSC Degree Information through tabular form
 Degree Name
 School or College
 Year
 Obtained Marks
 Total Marks
 Percentage

Asnwer1:
code:
<!DOCTYPE html>
<html>
<head>
<title>Admission Form</title>
</head>
<body bgcolor="pink">
<form action="Admission.php" method="post">
<h1 align="center">Online Admission System</h1>
<table align="center">
<tr>
<td><h3>Personal information</h3></td>
</tr>
<tr>
<td>Canidate Name:</td>
<td><input type="text" name="Cname"></td>
</tr>
<tr>
<td>Father name:</td>
<td><input type="text" name="Fname"></td>
</tr>
<tr>
<td>Cnic:</td>
<td><input type="text" name="Cnic"></td>
</tr>
<tr>
<td>Gender:</td>
<td> <input type="tex" name="Gender"</td>
</tr>
<tr>
<td>Contact no:</td>
<td><input type="tel" name="Contact"></td>
</tr>

<td>Email:</td>
<td><input type="text" name="Email"></td>
</tr>
<tr>
<td>Domicile:</td>
<td><label></label><br><br>
<select name="domicile">
<option value="">---select---</option>
<option value="kpk">kpk</option>
<option value="sindh">sindh</option>
<option value="Punjab">punjab</option>
</tr>
<tr>
<td><h3>Academic Information</h3></td>
</tr>
<tr>
<td>Name of degree:</td>
<td>Name of institute:</td>
<td>Passing year:</td>
<td>Obtain marks:</td>
<td>Total marks:</td>
<td>Percentage:</td>
</tr>
<td><input type="text" name="Name_of_Degree"></td>
<td><input type="text" name="Name_of_Institute"></td>
<td><input type="text" name="Passing_year"></td>
<td><input type="text" name="Obtain_Marks"></td>
<td><input type="text" name="Total_Marks"></td>
<td><input type="text" name="Percentage"></td>
</tr>
<tr>
<td><input type="text" name="Name_of_Degree"></td>
<td><input type="text" name="Name_of_Institute"></td>
<td><input type="text" name="Passing_year"></td>
<td><input type="text" name="Obtain_Marks"></td>
<td><input type="text" name="Total_Marks"></td>
<td><input type="text" name="Percentage"></td>
</tr>
</table>
<table align="center">
<tr>
<td>Press here to submit:</td>
<td><input type="submit" name="button" value="Submit"></td>
</tr>
</table>
</table>
</form>

</body>
</html>
Screeshot:
Part 2
Make DATABASE named as “GIMS” and Table name as Registration. When USER Submits Admission
Form. INSERT the FORM values in Registration Table with CNIC as Primary key. [5]

Asnwer2:
Code:
<!DOCTYPE html>
<html>
<head>
<title>Admission Form</title>
</head>
<body bgcolor="pink">
<form action="Admission.php" method="post">
<h1 align="center">Online Admission System</h1>
<table align="center">
<tr>
<td><h3>Personal information</h3></td>
</tr>
<tr>
<td>Canidate Name:</td>
<td><input type="text" name="Cname"></td>
</tr>
<tr>
<td>Father name:</td>
<td><input type="text" name="Fname"></td>
</tr>
<tr>
<td>Cnic:</td>
<td><input type="text" name="Cnic"></td>
</tr>
<tr>
<td>Gender:</td>
<td> <input type="tex" name="Gender"</td>
</tr>
<tr>
<td>Contact no:</td>
<td><input type="tel" name="Contact"></td>
</tr>

<td>Email:</td>
<td><input type="text" name="Email"></td>
</tr>
<tr>
<td>Domicile:</td>
<td><label></label><br><br>
<select name="domicile">
<option value="">---select---</option>
<option value="kpk">kpk</option>
<option value="sindh">sindh</option>
<option value="Punjab">punjab</option>
</tr>
<tr>
<td><h3>Academic Information</h3></td>
</tr>
<tr>
<td>Name of degree:</td>
<td>Name of institute:</td>
<td>Passing year:</td>
<td>Obtain marks:</td>
<td>Total marks:</td>
<td>Percentage:</td>
</tr>
<td><input type="text" name="Name_of_Degree"></td>
<td><input type="text" name="Name_of_Institute"></td>
<td><input type="text" name="Passing_year"></td>
<td><input type="text" name="Obtain_Marks"></td>
<td><input type="text" name="Total_Marks"></td>
<td><input type="text" name="Percentage"></td>
</tr>
<tr>
<td><input type="text" name="Name_of_Degree"></td>
<td><input type="text" name="Name_of_Institute"></td>
<td><input type="text" name="Passing_year"></td>
<td><input type="text" name="Obtain_Marks"></td>
<td><input type="text" name="Total_Marks"></td>
<td><input type="text" name="Percentage"></td>
</tr>
</table>
<table align="center">
<tr>
<td>Press here to submit:</td>
<td><input type="submit" name="button" value="Submit"></td>
</tr>
</table>
</table>
</form>

<?php
if(isset($_POST['button']))
{
$cname=$_POST['cname'];
$fname=$_POST['fname'];
$cnic=$_POST['cnic'];
$gender=$_POST['gender'];
$contact=$_POST['contact'];
$email=$_POST['email'];
//$domicile=$_POST['domicile'];
$Name_of_degree=$_POST['Name_of_degree'];
$Name_of_institute=$_POST['Name_of_institute'];
$Passing_year=$_POST['Passing_year'];
$Obtain_marks=$_POST['Obtain_marks'];
$Total_marks=$_POST['Total_marks'];
$Percentage=$_POST['Percentage'];
$con=mysqli_connect("localhost","root","","gims");
$sql="INSERT INTO registration
VALUES($cname','$fname','$cnic','$gender','$contact','$email','$Name_of_degree','$Name_of_instit
ute','$Passing_year','$Obtain_marks','$Total_marks','$Percentage');";
if(mysqli_query($con,$sql))
{
echo"Your values have been inserted successfully";
}
else
echo"Sorry There is an Error";
}
?>

</body>
</html>
Screenshot:

Part 3
Make a Page “”Admin.php”. Read the Table Registration from DATABASE GIMS and show all records
on the page in TABULAR FORM. There must be an option ACCEPT or REJECT for every record to be
displayed. [5]

Answer:
code:
<!DOCTYPE html>
<html>
<head>
<title>Admission form</title>
</head>
<body>
<form action="Admission.php" method="post">
<h4 align="center">Online admission system</h4>
<table align="center">
<tr>
<td><h3>Personal information</h3></td>
</tr>
<tr>
<td>Canidate name:</td>
<td><input type="text" name="cname"></td>
</tr>
<tr>
<td>Father name:</td>
<td><input type="text" name="fname"></td>
</tr>
<tr>
<td>Cnic:</td>
<td><input type="text" name="cnic"></td>
</tr>
<tr>
<td>Gender:</td>
<td> <input type="tex" name="gender"</td>
</tr>
<tr>
<td>Contact no:</td>
<td><input type="tel" name="contact"></td>
</tr>

<td>Email:</td>
<td><input type="text" name="email"></td>
</tr>
<tr>
<td>Domicile:</td>
<td><label></label><br><br>
<select name="domicile">
<option value="">---select---</option>
<option value="kpk">kpk</option>
<option value="sindh">sindh</option>
<option value="Punjab">punjab</option>
</tr>
<tr>
<td><h3>Academic information</h3></td>
</tr>
<tr>
<td>Name of degree:</td>
<td>Name of institute:</td>
<td>Passing year:</td>
<td>Obtain marks:</td>
<td>Total marks:</td>
<td>Percentage:</td>
</tr>
<td><input type="text" name="Name_of_degree"></td>
<td><input type="text" name="Name_of_institute"></td>
<td><input type="text" name="Passing_year"></td>
<td><input type="text" name="Obtain_marks"></td>
<td><input type="text" name="Total_marks"></td>
<td><input type="text" name="Percentage"></td>
</tr>
<tr>
<td><input type="text" name="Name_of_degree"></td>
<td><input type="text" name="Name_of_institute"></td>
<td><input type="text" name="Passing_year"></td>
<td><input type="text" name="Obtain_marks"></td>
<td><input type="text" name="Total_marks"></td>
<td><input type="text" name="Percentage"></td>
</tr>
</table>
<table align="center">
<tr>
<td>Press here to submit:</td>
<td><input type="submit" name="button" value="Submit"></td>
</tr>
</table>
</table>
</form>
<?php
if(isset($_POST['button']))
{
$cname=$_POST['cname'];
$fname=$_POST['fname'];
$cnic=$_POST['cnic'];
$gender=$_POST['gender'];
$contact=$_POST['contact'];
$email=$_POST['email'];
//$domicile=$_POST['domicile'];
$Name_of_degree=$_POST['Name_of_degree'];
$Name_of_institute=$_POST['Name_of_institute'];
$Passing_year=$_POST['Passing_year'];
$Obtain_marks=$_POST['Obtain_marks'];
$Total_marks=$_POST['Total_marks'];
$Percentage=$_POST['Percentage'];
$con=mysqli_connect("localhost","root","","gims");
$sql="INSERT INTO registration
VALUES($cname','$fname','$cnic','$gender','$contact','$email','$Name_of_degree','$Name_of_i
nstitute','$Passing_year','$Obtain_marks','$Total_marks','$Percentage');";
if(mysqli_query($con,$sql))
{
echo"Your values have been inserted successfully";
}
else
echo"Sorry There is an Error";
}
?>
</body>
</html>
<table align="center" border="2" style="font-size:8px;" cellspacing="0"; cellpadding="1px";>>
<tr>
<th>cname</th>
<th>Fname</th>
<th>cinic</th>

<th>gender</th>
<th>contact</th>
<th>email</th>
<th>degree name</th>
<th>intitude name</th>
<th>passing year</th>
<th>obtained marks</th>
<th>total marks </th>

<table align="center" border="2" style="font-size:8px;" cellspacing="0"; cellpadding="1px";>>


<tr>
<th>name </th>
<th>fname</th>
<th>cinic</th>
<th></th>
<th>gender</th>
<th>contact</th>
<th>email</th>
<th>degree name</th>
<th>institude name</th>
<th>passing year</th>
<th>obtained marks</th>
<th>total marrks</th>

<th>HSSCDEGREE_NAME</th>
<th>HSSCSCHOOL</th>
<th>HSSCYEAR</th>
<th>HSSCOBTAINMARKS</th>
<th>HSSCTOTALMARKS</th>
<th>HSSCPERSENTAGE</th>

<table align="center" width="600px" border="2">


<tr>
<th>ID</th>
<th>NAME</th>
<th>EMAIL</th>
<th>PASSWORD</th>
<th>MSG</th>
</tr>
<?php
$con1=mysqli_connect("localhost","root","","gism");
$sql1="SELECT* FROM regristration;";
$query=mysqli_query($con1,$sql1);
while($row=mysqli_fetch_array($query))
{

$NAME=$ROW[0]
$F_NAME=$ROW[1]
$CNIC=$ROW[2]
$IMG=$ROW[3]
$GENDER=$ROW[4]
$CELL_NUMBER=$ROW[5]
$EMAIL=$ROW[6]
$SSCDEGREE_NAME=$ROW[7]
$SCSCHOOL=$ROW[8]
$SSCYEAR=$ROW[9]
$SSCOBTAINMARKS=$ROW[10]
$SSCTOTALMARKS=$ROW[11]
$SSCPERSENTAGE=$ROW[12]
$HSSCDEGREE_NAME=$ROW[13]
$HSSCSCHOOL=$ROW[14]
$HSSCYEAR=$ROW[15]
$HSSCOBTAINMARKS=$ROW[16]
$HSSCTOTALMARKS=$ROW[17]
$HSSCPERSENTAGE=$ROW[18]

echo"

<td> $NAME</td>
<td> $F_NAME</td>
<td> $CNIC</td>
<td> $IMG</td>
<td> $GENDER</td>
<td> $CELL_NUMBER</td>
<td> $EMAIL</td>
<td> $SSCDEGREE_NAME</td>
<td> $SCSCHOOL</td>
<td> $SSCYEAR</td>
<td> $SSCOBTAINMARKS</td>
<td> $SSCTOTALMARKS</td>
<td> $SSCPERSENTAGE</td>
<td> $HSSCDEGREE_NAME</td>
<td> $HSSCSCHOOL</td>
<td> $HSSCYEAR</td>
<td> $HSSCOBTAINMARKS</td>
<td>$HSSCTOTALMARKS</td>
<td> $HSSCPERSENTAGE</td>

</tr>
";
}
?>
</table>
Screenshot:
Part 4
When Admin Clicks ACCEPT. That record must move in a separate table named as “” CONFIRM”” in
GIMS database. [5]
Answer:
_____________________________________________________________________________________
_____________________________________________________________________________________
_____________________________________________________________________________________
_____________________________________________________________________________________
___________________________________________________________________________________

GOOD LUCK 

You might also like