How do you define a constant in php

Assignment Help PHP Web Programming
Reference no: EM133565

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

Reference no: EM133565

Questions Cloud

Essential business deductions : Essential business deductions in each of the subsequent situations.
The concept of sustainable leadership : The concept of sustainable leadership
Evaluate taxable income and the income tax liability : Evaluate taxable income and the income tax liability (before credits or prepayments) on a joint return
Porter''s five forces analysis : PEST analysis, Porter's FIVE forces analysis, Porter's model
How do you define a constant in php : How do you define a constant in PHP. List the different types of errors in PHP.
Essentially analyse the position of the leader : Essentially analyse the position of the leader
Prepare bank reconciliation for donovan company : Prepare bank reconciliation for Donovan Company for September which reconciles the balance per books and the balance per bank to their adjusted accurate balances.
Elaborate on leadership style : Elaborate on leadership style
Using the cost model evaluate the amount : Using the cost model, at what amount could the land be reported in the statement of financial position of Jeng Ting Ltd for each reporting date? Describe your answers.

Reviews

Write a Review

PHP Web Programming Questions & Answers

  Random integral numbers based on normal distribution

Prepare a system to generate random integral numbers based on normal distribution. Study Data Generator's structure and extend number generation type to activate normal distribution.

  Shopping cart program for web applications class

Shopping Cart program for web applications class. Allows user to browse while keeping track of the items in which they will purchase at the end on the order page link and this will give a final price for all items.

  Create a web site for an apple farm

Create a web site for an apple farm. Create an HTML5 form allowing visitors to create an account with the site. Account details are to be stored in your MySQL database. Information should be stored in a secure way.

  Develop a dynamic website open university

Develop a dynamic website Open University

  Sample website project

This website consists of three sections: a narrative, a storyboard, and a business Website.

  Online banking application

Designing and developing a web applications The company you are working has secured a contract with a local banking group to develop an ONLINE BANKING APPLICATION using PHP and MySQL.

  Design a dynamic database

Design a dynamic database using Mangodb, html , and php.

  Show the accessibility and usability of website

The webpage must have several menus about country Azerbaijan such as "About Azerbaijan" "History" "Geography" "Landscape" and "Accessibility" menu.

  Implement a web application

Implement a web application called CS320Starter, which is similar to the crowd funding platform Kickstarter where people raise funds for their projects.

  Prepare an ajax enabled web form

Prepare an AJAX enabled web form utilising a ListView control that will allow logged-in staff to list, edit, delete, insert magazine details for magazines from a selected magazine category.

  Create a very simple order system as a web application

Create a very simple Order System as a web application.

  Which of the following jsp expressions is valid

A JSP expression can contain any Java expression that evaluates to a String object, Java object, primitive type, primitive type or Java object

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd