You are on page 1of 6

ASSIGNMENT/ASSESSMENT COVERSHEET

Student Name: Muhammad Shayan

First Name FAMILY/ Last Name


Registration Number: BSCS-023R17-30

Course Code Course Title

Internet and Web engineering

Department (Computer Computer Science


Science
/ Information Technology)
Class & Semester 6th

Assessment item Title: Due date/time: 25-08-2020

Tutorial Group (IF applicable):


Word Count (if applicable:

Lecture/Tutor Name:
Prof Kawneer kaleem

Extension Granted:  Yes  no Granted By:

I declare that this assessment item is my own work unless otherwise acknowledged and is in accordance with the University’s
academic integrity policy.
I certify that this assessment item has not been submitted previously for academic credit in this or any other course. I certify that I
have not given a copy or have shown a copy of this assessment item to another student enrolled in the course.
I acknowledge that the assessor of this assignment may, for the purpose of assessing this assignment:
• Reproduce this assessment item and provide a copy to another member of the Faculty; and/or
• Communicate a copy of this assessment item to a plagiarism checking service (which may then retain a copy of the item on its
database for the purpose of future plagiarism checking).
• Submit the assessment item to other forms of plagiarism checking.
I certify that any electronic version of this assessment item that I have submitted or will submit is identical to this paper version.

1
Internet and Web engineering
Assignment no 16:
Question no 01: There is a database with name of “institute” in which four
tables exists department, course, student, result.
Department: dep_id, dep_name
course_id, dep_id, course_code,
Course:
course_name
Student: std_id , std_name , dep_id , reg_no
Result: res_id , std_id , course_id, marks

Create a form in which you will retrieve courses with comparison of


department and create a list in which student reg, course name, and textbox
for marks is available.
Answer:
<?php
session_start();
$conn=mysqli_connect('localhost','root');
$db=mysqli_select_db($conn,'student_info');
if(isset($_POST['submit'])){
$registration no=$_POST['registraion no'];
$cource=$_POST['cource'];
$sql="select * from marks where registration no='$registration no.' && cource='$cource'";
$query=mysqli_query($conn,$sql);
$row=mysqli_num_rows($query);
if($row==1){
$_SESSION['registration no']=$registration no;
header('location:Ass 15 web.html');
}
else
{
header('location:index.php');
}
}
?>
<!DOCTYPE html>
<html>
<head>
<title>My table</title>
</head>
<body>
<center>
<table border ="2" border: 5px solid black; width="1000" height="200">
</center>
<tr>
<td > <center> <b> Search Deperment </b></center></td>
</tr>
<tr>

2
<td ><center><b>Department </b></center></td><td ><center> <input type="text" name="
text"/> </center></td>
</tr>
<tr>
<td> <center> <button class="btn success"><b>Search button </b></button> </center></td>
</tr>
</table>
<center>
<table border="2" width="1000" height="300">
</center>
<tr>
<td > <center><b> Student Registration no. </b></center></td><td> <center><b> Cource
</b> </center> </td><td> <center><b> Marks </b></center> </td>

</tr>
<tr>
<td><center><b> Abc 123 </b></td> <td> <center><b> A </b></center></td> <td ><center>
<input type="text" name=" text"/> </center></td>
</tr>
<tr>
<td><center><b> Abc 345</b></td> <td> <center><b> B </b></center></td> <td ><center>
<input type="text" name=" text"/> </center></td>
</tr>
<tr>
<td><center><b> Abc 987 </b></td> <td> <center><b> C </b> </center></td> <td ><center>
<input type="text" name=" text"/> </center></td>
</tr>
<tr>
<td> <center> <button class="btn success"><b>Submit Result</b></button> </center></td>
</tr>
</table>
Screen shot:

3
4
5
6

You might also like