WhatsApp-00963951432013 Admin
عدد المساهمات : 2429 نقاط : 302124 السٌّمعَة : 4 تاريخ التسجيل : 20/09/2008 العمر : 54 الموقع : www.aoua.123.st
| موضوع: Faculty of Computer Studies Course Code: M275 Course Title: Web Development Using PHP and MySQL Tutor Marked Assignment – First Semester 2015/2016 Cut-Off Date: TBA Total Marks: 100 Contents Question 1 ……………………..……………………………………….. الأربعاء نوفمبر 11, 2015 3:10 am | |
|
Faculty of Computer Studies Course Code: M275 Course Title: Web Development Using PHP and MySQL Tutor Marked Assignment – First Semester 2015/2016
Cut-Off Date: TBA Total Marks: 100
Contents Question 1 ……………………..………………………………………..……… 2 Question 2 ……………………………..………………..……………………… 2 Question 3 ………………………………..………………..…………………… 3
Plagiarism Warning: As per AOU rules and regulations, all students are required to submit their own TMA work and avoid plagiarism. The AOU has implemented sophisticated techniques for plagiarism detection. You must provide all references in case you use and quote another person's work in your TMA. You will be penalized for any act of plagiarism as per the AOU's rules and regulations.
Declaration of No Plagiarism by Student (to be signed and submitted by student with TMA work): I hereby declare that this submitted TMA work is a result of my own efforts and I have not plagiarized any other person's work. I have provided all references of information that I have used and quoted in my TMA work.
Name of Student: Signature: Date:
Question 1 [20 marks]
Using the AOU e-Library, go to the “Emerald Journals” sub-library and search for the term PHP. Among the first few results you should find a link to the case study “Database‐backed library websites: a case study of the use of PHP and MySQL at the University of Nottingham.”
Open/Download the article and write a brief summary on why it was decided to use Apache, MySQL and PHP. Note: write in your own words as many reasons as you like, but make sure to limit your answer to a maximum of 300 words.
Hint: you can write your answer as short bullet points. [20 marks]
Question 2 [50 marks] This question is based on the “guessing machine” (Chapter 11) that was discussed during the tutorials. You are asked to create a matching game, where the user will try to guess the correct order of the numbers {1, 2, 3, 4}. a- Create using HTML a form similar to the following: Note: You need to provide value for the name attribute of each of the 4 textboxes. [10 marks]
b- Make sure to set the action attribute of the form to submit the data to the file itself, just as we did with the “guessing machine”. [5 marks]
c- Add the following PHP section to the beginning of your file and complete it in a way to be able to provide hints to the user until he is able to guess the correct order such as the preview below. $val1 = 2; //You can change the order of the numbers as you wish $val2 = 1; $val3 = 4; $val4 = 3; If ( /* Add the proper condition here */ ) { $message = "Welcome to the matching game!"; $prev = ""; } else { $prev = $_POST['prev'];
//Add your code below and make sure to store the proper //data in $prev and add it to a hidden HTML element //in your form
} ?>
Sample run [35 marks]
Question 3 [30 marks]
Writing SQL queries:
Read the section “Using Join” of Chapter 16 in the book (pages 312 -> 314 in the fifth edition) then answer the following:
a- Create the master_name and email tables using proper types for the fields. [10 marks]
b- Write the proper insert queries to add all the data as the 2 tables in the book. [10 marks]
c- Update the LEFT JOIN query so that it will return the Fullname as a single column instead of 2 columns. Hint: you need to use a member of the CONCAT family of functions. [10 marks]
End of the Questions
| |
|