Cs-633_ecommerce_and_web_programming_solution.pdf

  • Uploaded by: hira
  • 0
  • 0
  • August 2019
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Cs-633_ecommerce_and_web_programming_solution.pdf as PDF for free.

More details

  • Words: 938
  • Pages: 5
Dated:07-11-2018

University of Agriculture Faisalabad Sub Campus Burewala Department of Computer Science (Winter-2018) Class: MSc(CS) Semester: 3th (A,B) Subject: E-Commerce and Web Programming Course Code: CS-633 Max. Marks: 12 Instructor: M.Shakeel Allowed Time: 50 Min. Exam: Mid Term 1. Justify you answer carefully, Answers without justification do not give any credits. 2. Plan your time wisely. Do not spend too much time on any one problem. Read thoroughly all of them first and attach them in the order that allows you to make the most progress. _____________________________________________________________________________________________

(Q.1)

(4)

(i) Metadata does not define _________ a) character set b) links c) scripts d) color (ii) Which element defines preformatted text? a)

b) <pre> c)


d) (iii) Which types of form elements can be excluded from the HTTP request? a)text, radio, and check box b)text, submit, and hidden c)submit and hidden d)radio and check box (iv) Which is not a property of attribute Behavior of <Marquee> tag? a.) alternate b.) blur c.) scroll d.) slide (v) What is the preferred way for adding a background color in HTML? a) b) yellow c) < body style="background-color:yellow"> d) text (vi) Who is Known as the father of PHP? a) Rasmus Lerdorf b) Tim Thompson c)Charles Darwin d)Tim Berners-Lee (vii) HTML web pages can be read and rendered by _____________. a)Compiler b)Server c)Web Browser d)Interpreter (viii) How can you make a bulleted list? a) <list> b) c)
    d)
      (ix) What is an ISP? a) Internet System Protocol b) Internal System Program c) Internet Service Provider d) None of the above (x) XML stands for ______________ extensible Markup Language ______________. (xi)   is used for ____to create a space in a line _____________________________. (xii) URL stands for ______Uniform Resource Locator ________________.

      Best of Luck

      Dated:07-11-2018

      (Q.2)

      (4)

      (i) How we can count the words in any string in PHP? (ii) How we can find the string position in any paragraph in PHP? (iii)How we can set the date between 31, December,2015 and 31, December,2018 in HTML? (v)How we can set three letter country code(PAK) with regular Expression on input field in HTML? (vi)How we set image with height(200px) and width(150px) align(right,top) in CSS? Body{ background-image: url("img_tree.png"); background-repeat: no-repeat; background-position: right top; background-attachment: fixed; } (vii)Difference between Padding and Margin? The CSS margin properties are used to create space around elements, outside of any defined borders. There are properties for setting the margin for each side of an element (top, right, bottom, and left). The CSS padding properties are used to create space inside elements, inside of any defined borders. There are properties for setting the margin for each side of an element (top, right, bottom, and left).

      Best of Luck

      Dated:07-11-2018

      (viii)How to create an array of a group of items inside an HTML form ? (ix)What is the difference between unset() and unlink() function? Variable empty or veriable undefined Delete File from folder (x)What is session and why do we use it? When data is required at another page we store it in session variable and we can access it on another page by session_start, we do not use any database for this purpose (xi)What is Open Source Software? Those software , anyone can use it without any certification, anyone can use by downloading from website and work on it … (xii)Why do we use multipart/form-data in html form? We use it when we upload any file data to server , by Using $_FILES on server side langugage

      (Q.3)

      (4)

      (i) A lecturer of University of Agriculture Faisalabad, wishes to accept an assignment online which is sent by every student. The assignment should be in .pdf format either .doc format. The file size should not be greater than the 0.3GB.If the file size greater than that size there is an error message show on screen. Write down the code for upload the file in HTML with client side validation in JavaScript and restrict that file size should not be greater than that size in PHP code and save it into database. 3

      JavaScript Code: <script> function fileValidation(){ var fileInput = document.getElementById('fileToUpload'); var filePath = fileInput.value; var allowedExtensions = /(\.pdf)$/i; Best of Luck

      Dated:07-11-2018

      if(!allowedExtensions.exec(filePath)){ alert('Please upload file having extensions .jpeg/.jpg/.png/.gif only.'); fileInput.value = ''; return false; } else { alert("ok"); } }

      HTML Code:
      Select image to upload:


      PHP Code: Best of Luck

      Dated:07-11-2018

      (ii) CSS can be added to HTML elements in 3 ways, Explain?

      CSS can be added to HTML elements in 3 ways: Inline - by using the style attribute in HTML elements Internal - by using a <style> element in the section External - by using an external CSS file The most common way to add CSS, is to keep the styles in separate CSS files. However, here we will use inline and internal styling, because this is easier to demonstrate, and easier for you to try it yourself.

      Best of Luck

      1

More Documents from "hira"

C2 Service Manual.pdf
April 2020 13
Patel Dhola Maru.docx
December 2019 27
57582906-mit.pdf
October 2019 24
Water Complete.docx
December 2019 19
3805515_2.pdf
November 2019 16