Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask PHP Expert

QUESTION 1

(a) Describe how the Web database architecture operates while accessing a PHP script. Illustrate your answer using a diagram.

(b) What is the difference between $message and $message?

(c) Explain each of the following string functions. Illustrate your answer with an example.

(i) strrev()

(ii) explode()

(iii) stristr()

(d) Write a PHP script to read a positive integer, n, from an input text box with the name "txtnum" and to calculate and print the value of 1 + 2 + ... + n.

QUESTION 2

(a) How do you define a constant in PHP?

(b) List the different types of errors in PHP.

(c) Exceptions are used to change the normal flow of a script if a specified error occurs. Describe how the Try, Throw and Catch statements are used to handle an exception.

(d) Outline the differences between mysql_fetch_object() and mysql_fetch_row().

(e) Write PHP script that allows you to fetch information entered in the two text box fields namely: txtStudent for student's name and txtClass for class name and finally appends the information into the file student.dat Your program must also respond by printing a welcome message as follows:

Welcome, x where x is the student name.

QUESTION 3

(a) Show how you can achieve the following in PHP:

(i) a page reloading itself

(ii) causes a web page redirection.

(b) Describe any two different types of arrays as used in PHP programming.

(c) Give two methods that might be used to control sessions in a web based application. Explain the shortcomings of each method.

(d) Write extract codes to demonstrate how PHP allows you to:

(i) create a Session

(ii) retrieve a Session value

(iii) delete a Session.

QUESTION 4

(a) List four benefits while using a relational database such as MySql.

(b) Consider a server with the following settings:
servername: localhost
username: donald
password: jerry
How does PHP allow you to open a connection to a MySQL database, ensuring that the script returns appropriate error message.

(c) Referring to Question 4(b), list the PHP statements that allows you to

(i) create the database named VideoClubDB

(ii) create the database table tblMovie

(iii) add the three fields: MovieName, MovieDirector and MovieType

(d) Referring to Question 4(b) and 4(c), write extract codes to display all the records from the tblMovie table and the results sorted by the MovieName column

PHP , Programming

  • Category:- PHP
  • Reference No.:- M9133979
  • Price:- $40

Priced at Now at $40, Verified Solution

Have any Question?


Related Questions in PHP

In php write a simple addtion calculator that reads in two

In PHP write a simple addtion calculator that reads in two values and then add them together and display the output. Be sure to validate both inputs and ensure that it can add 0+0 = Sum: 0. The user should be able to inp ...

Question develop a 5-6 page word document that describes

Question: Develop a 5-6 page Word document that describes the design for a small Web site that meets the following specifications. 1. The Web site includes four or more Web pages designed according to current usability g ...

Question using the course software and week one template as

Question: Using the course software and Week One Template as a starting point, create a new HTML webpage and include the following: • Write the code to display your name in the largest-size heading element. • Write the m ...

Question continue to build on the skills of providing web

Question: Continue to build on the skills of providing Web page content and structure with HTML and Web page style and layout using CSS. Demonstrate the skill of creating a dynamic Web page that includes JavaScript clien ...

Final project assignment -requirements specifications -1

FINAL PROJECT ASSIGNMENT - REQUIREMENTS / SPECIFICATIONS - 1. For the final project, you will have to make good use of your CMS using PHP and MySQL for the content delivery. You will have to be able to deliver the conten ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As