CS310 Assignment 1 Solution and Discussion
-
Assignment No. 01
Semester: Fall 2019
CS610: Open Source Web Application Development Total Marks: 10
Due Date: November 14, 2019
Topics Covered: Topics of Weeks 1 to 3Instructions:
Please read the following instructions carefully before submitting assignment. It should be clear that your assignment will not get any credit if:
The assignment is submitted after due date.
The submitted assignment does not open or file is corrupt.
Assignment is copied (partial or full) from any source (websites, forums, students, etc)Note: You have to upload .php file which will have code of PHP. Assignment in any other format (extension) will not be accepted and will be awarded with zero marks.
Objective:
The objectives of this assignment are:
• Installing and configuring web server
• Display data of PHP variables on HTML pageNote:
• This assignment is a Graded Assignment.
• The assignment submitted through email will not be accepted.
• This assignment is covering all topics of weeks 1 to 3.Guidelines:
Code should be properly indented.
You can use the following tools/software:
o Adobe Dreamweaver , Notepad
o XAMP, WAMP, Vertrigo Server
You will not use any other software to make .php fileFor any query about the assignment, contact at
Assignment Statement:
Suppose you have been hired as a web application developer in a software house. A task is given to you take an already designed HTML page and convert in PHP form. You have to save all the visible data HTML page in PHP variables and show with the help of “echo” command.
Sample Web Page:
Submission Instructions:
You have to submit single PHP file which will have all the code provided by us and PHP code you will write.
BEST OF LUCK!
-
Solution Code:
<?php $header = "Virtual University of Pakistan"; $quicklist = "QUICK LINKS"; $about = "About Us"; $admissions = "Admissions"; $faculties = "Faculties"; $student = "Student"; $campuses = "Virtual Campuses"; $contact_us = "Contact Us"; $intro = "INTRODUCTION"; $content = "Pakistan’s first University based completely on modern Information and Communication Technologies."; $footer = "M.A Jinnah Campus, Defence Road,<br> Off Raiwind Road, Lahore"; ?> <html> <head> <title>Assignment No. 1 (Solution) - Fall 2019</title> </head> <body bgcolor="#CCCCCC"> <table width="1800" border="0" align="center" cellpadding="20" cellspacing="0"> <tr> <td height="200" colspan="2" align="center" valign="middle" bgcolor="#CC6633"><h1><?php echo $header; ?></h1></td> </tr> <tr> <td width="300" rowspan="2" align="center" valign="top" bgcolor="#FF9966"><h3><?php echo $quicklist; ?></h3> <a href="#"><?php echo $about; ?></a><br /><br /> <a href="#"><?php echo $admissions; ?></a><br /><br /> <a href="#"><?php echo $faculties; ?></a><br /><br /> <a href="#"><?php echo $student; ?></a><br /><br /> <a href="#"><?php echo $campuses; ?></a><br /><br /> <a href="#"><?php echo $contact_us; ?></a><br /><br /> </td> <td width="1500" height="50" align="center" valign="top" bgcolor="#FFDECE"><h3><?php echo $intro; ?></h3></td> </tr> <tr> <td height="500" align="left" valign="top" bgcolor="#FFDECE"><p><?php echo $content; ?></p></td> </tr> <tr> <td height="140" colspan="2" align="center" valign="middle" bgcolor="#CC6633"><h4><?php echo $footer; ?></h4></td> </tr> </table> </body> </html>
Ideas 2
<?php $header = "Virtual University of Pakistan"; $quicklist = "QUICK LINKS"; $about = "About Us"; $admissions = "Admissions"; $faculties = "Faculties"; $student = "Student"; $campuses = "Virtual Campuses"; $contact_us = "Contact Us"; $intro = "INTRODUCTION"; $content = "Pakistan’s first University based completely on modern Information and Communication Technologies."; $footer = "M.A Jinnah Campus, Defence Road,<br> Off Raiwind Road, Lahore"; ?> <html> <head> <title>Assignment No. 1 (Solution) - Fall 2019</title> </head> <body bgcolor="#CCCCCC"> <table width="1800" border="0" align="center" cellpadding="20" cellspacing="0"> <tr> <td height="200" colspan="2" align="center" valign="middle" bgcolor="#CC6633"><h1><?php echo $header; ?></h1></td> </tr> <tr> <td width="300" rowspan="2" align="center" valign="top" bgcolor="#FF9966"><h3><?php echo $quicklist; ?></h3> <a href="#"><?php echo $about; ?></a><br /><br /> <a href="#"><?php echo $admissions; ?></a><br /><br /> <a href="#"><?php echo $faculties; ?></a><br /><br /> <a href="#"><?php echo $student; ?></a><br /><br /> <a href="#"><?php echo $campuses; ?></a><br /><br /> <a href="#"><?php echo $contact_us; ?></a><br /><br /> </td> <td width="1500" height="50" align="center" valign="top" bgcolor="#FFDECE"><h3><?php echo $intro; ?></h3></td> </tr> <tr> <td height="500" align="left" valign="top" bgcolor="#FFDECE"><p><?php echo $content; ?></p></td> </tr> <tr> <td height="140" colspan="2" align="center" valign="middle" bgcolor="#CC6633"><h4><?php echo $footer; ?></h4></td> </tr> </table> </body> </html>