Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask PHP Expert

Question 1

a) Write a simple PHP program that dynamically populates a dropdown list on page load with values retrieved from Database db_restaurant from table tbl_dish containing two fields namely dish_ID and dish_Name. Clearly state any assumptions you make.

b) Using table Student above, write an SQL query to retrieve the student record with the lowest marks.

student_ID

first name last name

marks

001

Steve

Highway

40

002

Bill

Johnson

80

003

Denis

Neeson

90

004

Sam

Button

70

Question 2

a. The form below contains an input text box for a user to enter his name and a group of radio buttons to select his gender. Write the PHP script to print the user's name and a welcome message depending on his gender:

• For males - "Sports items on special offer"
• For females - "50% discount on handbags"

Name:
Gender:
Male
Female

b. Consider a server with the following settings:

servername: localhost database name: monthsDB username: donald password: jerry

Create a connection string to connect to this database and explain each line of code.

C . What will be the output of the following extract codes? Describe fully how the program operates.
$states_of_the_USA = array (1 => "Alabama", "Alaska", "Arizona");
$x = array_count_values($states_of_the_USA); for ($counter=1; $counter<$x; $counter++) { echo"
$states_of_the_USA[$counter]";
}
?>

D) Write a PHP program to calculate and display the factorial of any number entered into a Text Box field.

Note: You will have to use a recursive function.

E) Distinguish between the include() statement and the require() statement.

PHP , Programming

  • Category:- PHP
  • Reference No.:- M92041439
  • Price:- $75

Guranteed 36 Hours Delivery, In Price:- $75

Have any Question?


Related Questions in PHP

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 ...

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 ...

  • 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