Embed
Email

php

Document Sample

Shared by: Kerala g
Categories
Tags
Stats
views:
0
posted:
12/30/2011
language:
pages:
6
MIT Arts, Commerce & Science College, Alandi, Pune

Practical Assignment of PHP



Assignments 1

Slot 1 Part A

1. Consider the following entities and their relationships

Doctor (doc_no, doc_name, address, city, area)

Hospital (hosp_no, hosp_name, hosp_city)



Doctor and Hospital are related with many-many relationship

Create a RDB in 3 NF for the above and solve following



Using above database, write a PHP script which accepts hospital name

and print information about doctors visiting / working in that hospital in

tabular format.



2.Consider the following entities and their relationships

Emp(emp_no,emp_name,address,phone,salary)

Dept(dept_no,dept_name,location)

Emp_Dept are related with one-many relationship

Cretae a RDB in 3NF for the above and solve following



Using above databases write a PHP script which will

a) Insert employee records & department records into the respective tables.

b) Print a salary statement in the format given below, for a given department

(Accept department name from the user).



Maximum Salary Minimum Salary Sum Salary







Slot 2 : Part B



3. Consider the following entities and their relationships

Movie (movie_no, movie_name, release_year)

Actor( actor_no, name)



Relationship between movie and actor is many – many with attribute rate

in Rs. Create a RDB in 3 NF for the above and solve following



Using above database , write PHP scripts for the following:

a). Accept actor name and display all movie names in which he has acted,

b) Insert a new movie information.

c) Update the release year of a movie .( accept the movie name from the

user)

4. Consider the following entities and their relationships

Student(Stud_id,name,class)

Competition(c_no,c_name,type)



Relationship between student and competition is many-many with attribute rank

and year. Create a RDB in 3NF for the above and solve the following



Using above database write a script in PHP to accept a competition name from

user and display information of student who has secured 1st rank in that

competition.



Assignment 2 - Graphics



1) Write PHP script









2) Write PHP script for following









3) write PHP script for following









2) 4) Write PHP script to print the string vertically



3) Write PHP script to

4) Write php script for following









5) Write php script for following









6) Do wtaer mark image copy Q7 on Q5



7) Create a image file php.jpg as shown in example 1 below and smoothly scales it down

to one-quarter of its size, yielding the image in example 2.









Resulting 1/4-sized image



Dividing the height and the width by 4 instead of 2 produces the output shown below.





Resulting 1/16-sized image

8) Cretae a form to accept the following information



Create image





Width Height :



Text Color Red Green Blue





Text String



X co-ordinate : y co-ordinate



Shape :



Draw Image









Assignment 3 – XML



Q1 ) Create a XML file which gives details of books available in “ ABC Bookstore”

from following categories 1) Technical

2) Cooking

3) YOGA

1) Create a DomDocument object and load this XML file.

2) Get the output of this Document to the browser

3) Save this [. XML] document in another format i.e. in [.doc]

4) Write a XML programme to print Names of the books available in books.xml file.

Q2 ) Link Rajashree.xml document to the CSS style sheet and get well formatted output.

Details of Rajashree .xml are:





……….

…………

…………





Store details of at least 5 movies which got released during 1990-2010.

1) MovieName : Color

Font Name, Font Size, Font- weight

2) ActorName and ReleaseYear: Color,

Font Name, Font size, Font weight.

Q3 ) Write a PHP script to parse XML file and display different types of information

from it.







Programming PHP



Rasmus Lerdof

Kevin Tartoe



A greater book





PHP Pocket Reference



Rasmus Lerdof



It really does fit in your pocket





Output should be like this



My Library – Netscape X

File Edit View Go Communicator Help



Programming PHP Rasmus Lerdof, Kevin Tertoe

PHP Pocket Reference Rasmus Lerdof









4) Write a PHP script to generate an XML in the following format









Programming PHP

o’Relly





Beginners PHP

WROX









5) Cretae an application that reads “Book.xml” file into simple XML object. Display

attributes and elements(Hint: use simple_xml_load_file() function)



Related docs
Other docs by Kerala g
union-budget-2012-13-highlights
Views: 102  |  Downloads: 0
notification M.Tech_05-03-09
Views: 59  |  Downloads: 0
India_Customs Regulation 1
Views: 56  |  Downloads: 0
CE Notification 39-2011-12.9.2011
Views: 54  |  Downloads: 0
STATISTICS
Views: 72  |  Downloads: 0
A Hero (R.K. Narayan)
Views: 91  |  Downloads: 6
RRBPatna-Info-HN
Views: 116  |  Downloads: 0
RRB-Notice-Para
Views: 113  |  Downloads: 0
By registering with docstoc.com you agree to our
privacy policy

You are almost ready to download!

You are almost ready to download!